Configure Routers - Switches
Configure Routers - Switches
interface FastEthernet0/0
ip address 192.168.0.1 255.255.255.0
no shutdown
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.0
no shutdown
Switch
● A Layer 2 Switch is not IP routing aware.
● It does however support a single IP address for management.
● The IP address and subnet mask is configured on the Switched Virtual
Interface (SVI) for the default VLAN 1
● A default gateway also needs to be configured to allow connectivity to other
subnets
Hostname
A descriptive hostname makes it easier to identify the device.
Eg. NY-F1-SW1
Rip
● The Routing Information Protocol (RIP) is a Distance Vector routing protocol
● It uses hop count as its metric
● The maximum hop count is 15
● It will perform Equal Cost Multi Path, for up to 4 paths by default
router rip
version 2
no auto-summary
network 10.0.0.0
The ‘network’ command should reference a classful network. No subnet
mask is specified
Default Route Injection (no need to manually set default route on each of the routers)
EIGRP
● EIGRP (Enhanced Interior Gateway Routing Protocol) is an Advanced
Distance Vector routing protocol
● It supports large networks
● It has very fast convergence time
● It supports bounded updates where network topology change updates are
only sent to routers affected by the change
● Messages are sent using multicast
● EIGRP will automatically perform equal cost load balancing on up to 4 paths
by default
● This can be increased up to 16 paths
● EIGRP can also be configured to perform unequal cost load balancing
EIGRP Verification:
R1#show run | section eigrp
R1#show ip eigrp interfaces
R2#show ip eigrp neighbors
OSPF
R1(config)#router ospf 1
R1(config-router)# network 10.0.0.0 0.0.255.255 area 0
The network command means:
● Look for interfaces with an IP address which falls within this range.
● Enable OSPF on those interfaces – send out and listen for OSPF hello
messages, and peer with adjacent OSPF routers.
● Advertise the network and mask which is configured on those interfaces.
OSPF Router ID
● OSPF routers identify themselves using an OSPF Router ID which is in the
form of an IP address.
● This will default to being the highest IP address of any loopback interfaces
configured on the router, or the highest other IP address if a loopback does
not exist.
● Loopback interfaces never go down so the Router ID will not change.
● You can also manually specify the Router ID.
● Best practice is to use a Loopback or manually set the Router ID.
R1(config-router)#router ospf 1
R1(config-router)#router-id 2.2.2.2
% OSPF: Reload or use "clear ip ospf process" command, for this to take effect
R1#clear ip ospf process
R1#show ip protocols
Bandwidth vs Speed/Clock
● The ‘bandwidth’ setting on an interface does not affect the physical
transmission rate – that is set by the ‘speed’ or ‘clock rate’
● If you set a bandwidth of 50 Mbps on a FastEthernet interface, it will still
transmit at 100 Mbps
OSPF Cost
● The cost is automatically derived from the interface bandwidth
● Cost = Reference Bandwidth / Interface Bandwidth
● The default reference bandwidth is 100 Mbps
● FastEthernet link cost defaults to 1 (100 / 100)
● T1 link cost defaults to 64 (100 / 1.544)
R1(config)#router ospf 1
R1(config-router)#auto-cost reference-bandwidth 100000 (100Gbps)
DR and BDR
● A DR Designated Router and BDR Backup Designated Router are elected
● The router with the highest priority becomes DR, and the router with the 2nd
highest priority becomes BDR
● Default priority is 1, the higher the better (0 - 255)
● Highest Router ID is used in case of a tie
● On multiaccess segments such as Ethernet, the routers elect the DR and
BDR at the 2-Way stage
● There is no election on point to point links
R1(config)#interface FastEthernet 0/0
R1(config-if)#ip ospf priority 100
R4(config)#interface FastEthernet 0/0
R4(config-if)#ip ospf priority 0
R4#clear ip ospf process
R2(config)#router ospf 1
R2(config-router)#network 10.1.0.0 0.0.255.255 area 0
R2(config-router)#network 10.0.0.0 0.0.255.255 area 1
R2(config-router)#area 0 range 10.1.0.0 255.255.0.0
R2(config-router)#area 1 range 10.0.0.0 255.255.0.0
Loopbacks
config t
interface loopback 0
Passive Interface
The passive-interface command has the same effect on our routing protocols which is to
prevent routing updates.
For OSPF and EIGRP, the command stops hello packets from being sent. Therefore, it will
not discover any neighbors which results in prevention of routing updates, both outgoing and
incoming.
For RIP, the command will disable the interface from sending multicast updates. However, it
is still able to receive incoming updates.
router rip
passive-interface f0/0
network 203.0.113.0
Troubleshoot
1. Layer 1
a. Show ip interface brief
b. Show interface
2. Layer 2
a. Show arp
b. Show mac address-table
3. Layer 4
a. Telnet
4. Dns
a. nslookup
b. Ping by FQDN