How to create DHCP server and a policy in the Fortigate

Here is an example script that demonstrates how to use the  fortigate-api  package to create a DHCP server and a policy in the Fortigate   from fortigate_api import FortigateAPI # Create a FortigateAPI object fgt = FortigateAPI(host="host", username="username", password="password") # Create a DHCP server data = {     "default-gateway": "192.168.255.1",     "netmask": "255.255.255.0",     "interface": "vlan.123",     "ip-range": [         {"start-ip": "192.168.255.2", "end-ip": "192.168.255.254",}     ], } fgt.dhcp_server.create(data) # Create a policy in the Fortigate data = dict(     name="POLICY",     status="enable",     action="accept",     srcintf=[{"name": "any"}],     dstintf=[{"name": "any"}],     srcaddr=[{"name": "all"}],     dstaddr=[{"name&quo

how to upgrade cisco switch ios via tftp

 =========================STEPS TO UPGRADE CISCO DEVICE IOS=====================

Step 1: login to that device (console Access)

Step 2: Give an ip address to any logical interface (vlan 1)

Step 3: Dowload that device latest ios from the Cisco website

Step 4: Connect your system via console as well as the ethernet cable to that device

Step 5: Give the ip address to your ethernet adapter in your system (same network)

Step 6: Download TFTP64/32 application from internet (to make your system tftp server)

Step 7: Open that application with default setting and select your adapter in that application

Step 8: Bring that downloaded IOS to that application server inerface directory

step 9: Go to you Cisco device console and type the following comands in the privledge mode

copy tftp://<your system ip>/<downloaded ios full name path with extention> flash:

press enter it will start downloading to your cisco device flash memory

configure terminal

boot system flash:<ios name with extention>

reload [privledge mode]

Example: copy tftp://192.168.1.6/c2960cx-universalk9-mz.152-7.E5.bin flash:

configure terminal

boot system flash:c2960cx-universalk9-mz.152-7.E5.bin

exit/ctrl^z

reload [privledge mode]

Comments

Popular posts from this blog

How to Configure VXLAN in FortiGate Firewall

Higher Availability in FortiGate and VRRP in Cisco

Python Script to take the Backup of Multiple device in a Network