This article was co-authored by wikiHow staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for wikiHow. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College.
This article has been viewed 11,860 times.
Learn more...
Do you need to enable IP routing on a Cisco switch or router? By default, IP routing is disabled on most Cisco routers and switches. This can prevent devices on different VLANs from communicating with one another. In order for these devices to communicate with one another, the VLAN switches or routers need to have IP routing enabled and configured to route traffic between the two devices. This wikiHow teaches you how to use simple IOS commands to enable IP routing on your Cisco router or switch.
Steps
Connecting to your Cisco Router
-
1Connect your computer to the router or switch. If your router has a USB port, you can connect to your PC using a USB connection. If your router only has a Console port, you will most likely need a DB9-to-RJ45 cable. Connect the DB9 end of the cable to the Console port on your router. Then connect the female RJ45 end to a male RJ45 port on your computer. If your computer does not have a male RJ45 port, you can use a female RJ45-to-USB adapter.
- Alternatively, you can use a rollover cable (which is similar to an Ethernet cable, except the pins are reversed on the other end), and connect it to a female DB9-to-RJ45 adapter.
- Warning: Do NOT connect a rollover cable from the Ethernet port on your computer to the Console port on your router or switch. This will blow out the Console port on the router or switch.
-
2Download a Terminal Emulation program (Windows only). If you are using a Mac or Linux computer, you already have a Terminal program built-in. If you are using a Windows PC, you need to download a terminal emulation program, such PuTTY.Advertisement
-
3Find the port number that your Cisco router or switch is connected to. If you are using a DB9-to-RJ45 cable, you will first need to install the drivers that came with the cable. Once you have your Cisco router or switch connected to your PC, use one of the following steps to find out the port number it is connected to:
- Windows: Right-click the Windows Start menu and click Device Manager. Expand "Ports (COM & LPT)" in the list of devices. Note the port number your router is connected to (i.e, "COM1")
- Mac: Open the Terminal and type cd /dev and press Enter. Then type ls -ltr /dev/*usb* and press Enter. The port number will be listed after "/dev/tty.usbmodem" or " /dev/tty.usbserial".
- Linux: Open the Terminal and type cd /dev and press Enter. Then type ls -ltr *ACM* and press Enter. The port number will be listed after "/dev/ttyUSB" or "/dev/ttyACM".[1]
-
4Open a Terminal connection to the router or switch. Once you have the port number it is connected to, use one of the following steps to open a Terminal connection to your router or switch:[2]
- Windows: Open PuTTY. Select Sessions in the Category menu to the left. Select Serial under "Connection type". Enter the port number the switch is connected to in the box labeled "Serial line." Leave the speed as "9600". Then click Open.[3]
- Mac: Open the Terminal and type screen /dev/tty.usbmodem[port number] 9600 and press Enter. Replace "[port number]" with the port number you retrieved from the previous step.
- Linux: Open the Terminal and type screen /dev/ttyACM[port number] 9600 and press Enter. Replace "[port number]" with the port number you retrieved from the previous step.
Enabling IP Routing
-
1Connect to your router or switch. If you haven't already done so, connect your router or switch to your computer. Then open a PuTTY or Terminal connection to your router or switch.
-
2Type enable and press ↵ Enter. This enables EXEC mode. You may be asked to enter a password, if one is set.
-
3Type configure terminal and press ↵ Enter. This enters Global Configuration mode.
-
4Type ip routing and press ↵ Enter. This enables IP routing on your router or switch.
- If you want to exit Global Configuration mode, type end and press Enter.
Assigning IP Addresses to Switch Virtual Interfaces
-
1Understand what Switch Virtual Interfaces are. A single router or switch can host multiple networks called "VLANs" Devices on a VLAN can communicate with each other without the user or a router or switch. However, each VLAN must have a Switch Virtual Interface in order for devices from different VLANs to communicate with each other.[4]
-
2Enter Global Configuration mode. To enter Global Configuration mode, open a Terminal or PuTTY connection to the switch or router, and type "enable" and press "Enter." Then type "configure terminal" and press "enter".
-
3Type interface vlan followed by the VLAN ID and press ↵ Enter. This specifies the VLAN you want to configure. For example, if you wanted to configure VLAN1, you would type interface vlan 1 and press Enter.
-
4Type ip address followed by the IP address and subnet mask of the network. An example command would be ip address 10.0.0.1 255.255.255.0 This assigns an IP address and subnet mask to the VLAN
-
5Type end and press ↵ Enter. This exits the VLAN configuration mode and returns you to Global Configuration mode.
- If you want to view statistics for all the VLAN interfaces on your router or switch, type show interfaces vlan [vlan id] and press enter Replace [vlan id] with the actual VLAN ID number.
Configuring Default Routes and Networks
-
1Understand what default routes and networks are. When a router receives a packet of information, it checks the destination address to route that information to the proper address. If a packet of information does not have a destination address, you can assign a default address and network to send all packets that do not have a destination address.[5]
-
2Enter Global Configuraion mode. If you have not already done so, connect to your router or switch using PuTTY or the Terminal. Then type enable and press Enter to enter Exec mode. Then type configure terminal and press Enter to enter Global Configuration mode.
-
3Type ip route followed by the default IP address and press ↵ Enter. This assigns the default route and network. An example of a default network could be "0.0.0.0 0.0.0.0" To set this as the default network, you would type, ip route 0.0.0.0 0.0.0.0.[6]
References
- ↑ https://www.mathworks.com/help/supportpkg/arduinoio/ug/find-arduino-port-on-windows-mac-and-linux.html
- ↑ https://content.cisco.com/chapter.sjs?uri=/searchable/chapter/www.cisco.com/content/en/us/td/docs/routers/connectedgrid/cgr1000/hardware/cgr1120/installation/app-console.html.xml
- ↑ https://www.youtube.com/watch?v=jIRRsIgfHU8
- ↑ https://www.networkstraining.com/what-is-cisco-svi-configuration-example/
- ↑ https://www.computernetworkingnotes.com/ccna-study-guide/default-routes-in-cisco-routers-explained.html
- ↑ https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst1000/software/releases/15_2_7_e/configuration_guides/rtng/b_1527e_routing_c1000_cg/configuring_ip_unicast_routing.html