Routing and ..
Routing and ..
• Router:
• Connects one network to another network
• Determines the best route to the destination before forwarding traffic to the
next router along the path
• Responsible for routing traffic between network
• Routing table used to determine the most efficient path to reach the
destination
• The primary functions of a router are to:
• Determine the best path to send packets
• Forward packets toward their destination
• Routes • Routing Table • Bandwidth • Delay • Cost • Administrative
Distance • Default Route • Static Route
Trace a Route
tracert google.com
• Part 1: Set Up the Topology and Initialize Devices
• Cable equipment to match the network topology.
• Initialize and restart the router and switch.
• Part 2: Configure Devices and Verify Connectivity
• Assign static IPv4 information to the PC interfaces.
• Configure basic router settings.
• Verify network connectivity.
• Configure the router for SSH.
• Part 3: Display Router Information
• Retrieve hardware and software information from the router.
• Interpret the output from the startup configuration.
• Interpret the output from the routing table.
• Verify the status of the interfaces.
• Router> enable
• Router#
• Router# config terminal
• Router(config)#
• Router(config)# hostname R1
• Disable DNS lookup to prevent the router from attempting to translate incorrectly entered commands as though they
were hostnames
• R1(config)# no ip domain-lookup
• Require that a minimum of 10 characters be used for all passwords
• R1(config)# security passwords min-length 10
• R1(config)# enable secret cisco12345
• R1(config)# line con 0
• R1(config-line)# password ciscoconpass
• R1(config-line)# exec-timeout 5 0 (The session will timeout in 5 minutes and 0 seconds)
• R1(config-line)# login
• R1(config-line)# logging synchronous
• R1(config-line)# exit
• R1(config)#
• R1(config)# line vty 0 4
• R1(config-line)# password ciscovtypass
• R1(config-line)# exec-timeout 5 0
• R1(config-line)# transport input telnet
• R1(config-line)# login
• R1(config-line)# logging synchronous
• R1(config-line)# exit
• R1(config)#
• R1(config)# service password-encryption
• R1(config)# banner motd #Unauthorized access prohibited!#
• R1(config)# int g0/0
• R1(config-if)# description Connection to PC-B
• R1(config-if)# ip address 192.168.0.1 255.255.255.0
• R1(config-if)# no shutdown R1(config-if)# int g0/1
• R1(config-if)# description Connection to S1
• R1(config-if)# ip address 192.168.1.1 255.255.255.0
• R1(config-if)# no shutdown
• R1(config-if)# exit
• R1# clock set 17:00:00 18 Feb 2013
• R1# copy running-config startup-config
• R1#
• R1# configure terminal
• R1(config)# ip domain-name CCNA-lab.com
• R1(config)# username admin privilege 15 secret adminpass1
• R1(config)# line vty 0 4
• R1(config-line)# transport input ssh
• R1(config-line)# login local R1(config-line)# exit
• R1(config)# crypto key generate rsa modulus 1024
• R1(config)# exit
• R1#
• R1# show ip route
• R1# show ip interface brief
• A router learns about remote networks in two ways :
• Manually entered into the route table using static routes
• Static routes are not automatically updated and must be reconfigured when topology changes
• Dynamically (Automatically) learned using a routing protocol
Default static routes are commonly used when connecting:
• An edge router to a service provider network
• A stub router (a router with only one upstream neighbor router)
Default route is used when no other routes in the routing table match the destination IP
• R3(config)# interface s0/0/0
• R3(config-if)# ip address 10.1.1.2 255.255.255.252
• R3(config-if)# clock rate 128000
• R3(config-if)# no shutdown
• R1# show ip interface brief
• R1(config)# ip route 192.168.1.0 255.255.255.0 10.1.1.2
• R3(config)# ip route 192.168.0.0 255.255.255.0 s0/0/0
• R1(config)# ip route 198.133.219.0 255.255.255.0 S0/0/1
• RR1(config)# no ip route 209.165.200.224 255.255.255.224 10.1.1.2
• R1(config)# no ip route 198.133.219.0 255.255.255.0 S0/0/1
• Note: A static route can be removed with the no command without specifying the exit
interface or nexthop ip address as displayed below.
• R1(config)# no ip route 209.165.200.224 255.255.255.224
• R1(config)# no ip route 198.133.219.0 255.255.255.01(config)# ip route 198.133.219.0
255.255.255.0 10.1.1.2
• Default route
• R1(config)# ip route 0.0.0.0 0.0.0.0 s0/0/1
Exercise …
Dynamic Routing Protocol Overview
Dynamic Routing Protocol Overview
• RIP protocol was updated to RIPv2 to accommodate growth in the network environment
• RIPv2 does not scale to current larger network implementations
• Both versions of RIP, RIPv1 and RIPv2, are Distance Vector Routing Protocols that use router hop counts as
their metrics. They support a maximum hop count value of 15. Any router farther than 15 hops away is
considered to be unreachable.
• Routing Protocols developed to meet the need of larger networks include:
• Open Shortest Path First (OSPF)
• Intermediate System-to-Intermediate System (IS-IS).
• Enhanced IGRP (EIGRP)
• Border Gateway Protocol (BGP) is used between Internet service providers (ISPs)
Dynamic Routing Protocols
• Purpose of dynamic routing protocols includes:
• Discovery of remote networks
• Maintaining up-to-date routing information
• Choosing the best path to destination networks
• Ability to find a new best path if the current path is no longer available
R1# show ip protocols
R2# show ip route
R1(config)# router rip
R1(config-router)# no auto-summary
Issue the clear ip route * command to clear the routing
table.
R1# clear ip route *
Port Security: Operation
• Port security limits the number of valid MAC addresses allowed to
transmit data through a switch port.
• If a port has port security enabled and an unknown MAC address sends data,
the switch presents a security violation.
• Default number of secure MAC addresses allowed is 1.
• S1(config)# interface range fa0/1 - 2
• S1(config-if-range)# switchport port-security
• S1(config-if-range)# switchport port-security maximum 1
• Switch S2
• S2(config)# vlan 10 S2(config-vlan)# name Students S2(config-vlan)# vlan 20 S2(config-vlan)# name
Faculty S2(config)# interface f0/1 S2(config-if)# switchport mode trunkS2(config-if)# interface f0/18
S2(config-if)# switchport mode access S2(config-if)# switchport access vlan 20
• Router R1
• R1(config)# interface g0/1.1 R1(config-subif)# encapsulation dot1Q 1 R1(config-subif)# ip address
192.168.1.1 255.255.255.0 R1(config-subif)# interface g0/1.10 R1(config-subif)# encapsulation
dot1Q 10 R1(config-subif)# ip address 192.168.10.1 255.255.255.0 R1(config-subif)# interface
g0/1.20 R1(config-subif)# encapsulation dot1Q 20 R1(config-subif)# ip address 192.168.20.1
255.255.255.0 R1(config-subif)# exit R1(config)# interface g0/1 R1(config-if)# no shutdown
ACL Operation