CIT 384: Network AdministrationSlide #1 CIT 384: Network Administration Routing ][
CIT 384: Network AdministrationSlide #2 Topics 1.Switch Forwarding Process 2.IP Routing Process 3.DNS 4.Connected and Static Routes 5.Classful Routing 6.VLSM 7.Summarization
CIT 384: Network AdministrationSlide #3 Switch Forwarding Process 1.Determine the VLAN in which the frame should be forwarded as follows: a.If frame arries on an access interface, use the interface’s access VLAN. b.If frame arrives on a trunk interface, use VLAN listed in trunking header. 2.If incoming interface is in STP Learning or Forwarding State in that VLAN, add source MAC address to MAC address table with incoming interface and VLAN ID. 3.If incoming interface is not in an STP Forwarding State for that VLAN, discard the frame. 4.Look for destination MAC address of frame in MAC address table for VLAN identified in step 1. If address is a.Found: Forward frame out the only interface listed in the matched address table entry. b.Not found: Flood frame out all other access ports in same VLAN and out all trunk ports that support this VLAN.
CIT 384: Network AdministrationSlide #4 IP Routing Process: Edge Hosts 1.Compare destination IP of packet to local subnet and netmask. 2.If destination on same subnet as host, send packet directly to host. ARP is used to find destination MAC address. 3.If destination host not on same subnet, then send packet directly to gateway router. ARP is used to find router’s MAC address.
CIT 384: Network AdministrationSlide #5 IP Routing Process: Routers 1.Check errors using data link FCS. If error, discard frame. 2.Check frame’s destination MAC address, and process only if directed to this router or to a broadcast/multicast address. 3.Discard frame’s old data-link header and trailer, leaving IP packet. 4.Compare destination IP address to routing table, finding route that matches destination address. Route identifies outgoing interface of router and possibly next-hop router. 5.Determine destination MAC address. 6.Encapsulate packet inside new data link header and trailer, appropriate for outgoing interface, and fwd packet.
CIT 384: Network AdministrationSlide #6 IP Routing Example PC1 sends packet to PC3 ( ) –PC1 configuration ifconfig eth netmask route add default gw –Compares to local net: Network address: Subnet mask: –Since is not in address range, Sends to default route
CIT 384: Network AdministrationSlide #7
CIT 384: Network AdministrationSlide #8 IP Routing Example: R1 1.R1 checks FCS, finds no errors. 2.R1 finds its own fa0/0 MAC as dest MAC, so it will process the frame. 3.R1 discards old data-link header and trailer. 4.R1 compares dest IP ( ) to routing table, finding a route for with netmask R1 looks up MAC address of route destination ( ) in ARP table. 6.R1 encapsulates IP packet in new Ethernet frame, with R1’s fa0/1 MAC address as destination.
CIT 384: Network AdministrationSlide #9 IP Routing Example: R2 1.R2 checks FCS, finds no errors. 2.R2 finds own fa0/0 MAC address as destination MAC, so it will process frame. 3.R2 discards old data-link header and trailer. 4.R2 compares destination IP ( ) to routing table, finding matching route with outgoing interface fa0/1. 5.R2 looks up destination IP’s MAC address. 6.R2 encapsulates IP packet in new Ethernet frame, with R2’s fa0/1 MAC as source and PC3’s MAC as destination. R2 sends the frame.
CIT 384: Network AdministrationSlide #10 Routing Example with PPP
CIT 384: Network AdministrationSlide #11 Matching the Most Specific Route R1#show ip route rip /16 is variably subnetted, 5 subnets, 4 masks R /32 [120/1] via , 00:00:04, Serial0/1/1 R /24 [120/2] via , 00:00:09, Serial0/1/0 R /22 [120/1] via , 00:00:04, Serial0/1/1 R /16 [120/2] via , 00:00:09, Serial0/1/0 R /0 [120/3] via , 00:00:09, Serial0/1/0 R1#show ip route Routing entry for /16 Known via "rip", distance 120, metric 2 Redistributing via rip Last update from on Serial0/1/0, 00:00:19 ago Routing Descriptor Blocks: * , from , 00:00:19 ago, via Serial0/1/0 Route metric is 2, traffic share count is
CIT 384: Network AdministrationSlide #12 Ranges defined by each route – – – –
CIT 384: Network AdministrationSlide #13 Matching the Most Specific Route : Matches all 5 routes Longest prefix is /32, route to / : Matches last 4 routes Longest prefix is /24, route to / : Matches last 3 routes Longest prefix is /22, route to / : Matches last 2 routes Longest prefix is /16, route to /16
CIT 384: Network AdministrationSlide #14 Why DNS? HOSTS.TXT original flat text file mapping Problems –Load: everyone had to d/l from one server. –Collisions: no two hosts can have the same name in a flat namespace –Consistency: by the time a host file had reached every host, it was already out of date when compared to the master copy on the server.
CIT 384: Network AdministrationSlide #15 DNS Domain Name System –Released in 1984 with RFCs 882 and 883. –Nameservers provide name/IP mappings. –Resolvers on clients query nameservers. Distributed database of name/IP mappings. –Tree structure prevents collisions. –Each domain controls its own nameservers, which contain db for names in that domain. –Nameservers can query other-domain nameservers when resolvers ask for names outside the local domain.
CIT 384: Network AdministrationSlide #16 The DNS Namespace
CIT 384: Network AdministrationSlide #17 Domains are Subtrees Domains are subtrees of the DNS tree. –Similar to subtrees of directory tree. –Does not indicate anything about subnet addresses. –Can be administered independently.
CIT 384: Network AdministrationSlide #18 Delegation of Domains Top Level Domains delegate subdomains to organizations. Organizations can delegate subdomains of their domain too.
CIT 384: Network AdministrationSlide #19 Name Resolution Process 1.Resolver on host translates hostnames for apps. 2.Resolver asks nameserver to translate for it. 3.Nameserver asks root server, with refers it to au svr. 4.Au server refers to gov.au server. 5.Gov.au server refers to gbrmpa.gov.au server. 6.Gbrmpa.gov.au server returns IP address to nameserver. 7.Nameserver may cache translation for future use. 8.Nameserver sends IP address to resolver.
CIT 384: Network AdministrationSlide #20 Mapping Addresses to Names Use in-addr.arpa domain. –Nodes are labeled by an octet of IP address. –in-addr has 256 subtrees, each representing the first octet of an IP address. –Four-level nodes map back to hostnames.
CIT 384: Network AdministrationSlide #21 Maximum Transmission Unit (MTU) router(config)# interface fa0/1 router(config-if)# mtu 1000 router(config-if)# end
CIT 384: Network AdministrationSlide #22 Connected Routes Routes to networks where rtr has interface. –Router determines these routes from interface IP address and subnet. –Listed in route table with a C prefix. How to deliver packets to non-connected nets? –Needs routes for those subnets, or –A default route for all other networks.
CIT 384: Network AdministrationSlide #23 show ip route Router-251>show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is to network /8 is variably subnetted, 2 subnets, 2 masks C /24 is directly connected, FastEthernet0/0 C /16 is directly connected, FastEthernet0/1 S* /0 [1/0] via
CIT 384: Network AdministrationSlide #24 show ip route address Router-251>show ip route Routing entry for /24 Known via "connected", distance 0, metric 0 (connected, via interface) Routing Descriptor Blocks: * directly connected, via FastEthernet0/0 Route metric is 0, traffic share count is 1 Router-251>show ip route % Network not in table
CIT 384: Network AdministrationSlide #25 Static Routes Routes entered by network administrator. –Listed in route table with S prefix. –Easy to understand network behavior. –Avoids problems with routing protocols. –Requires extensive planning for large networks. –Does not adapt to changing networks. –Does not scale to large networks.
CIT 384: Network AdministrationSlide #26 Creating a Static Route ip route network subnet destination ip route ip route ip route fa0/1
CIT 384: Network AdministrationSlide #27 Default Routes What happens if no route matches an IP? –Packet is discarded by router. –Unless there is a default route. Default route matches all destination addrs. –Listed with S* prefix in routing table. Configuring a default route ip route Configuring a default route for routing protocols ip default-network (a route to 10.x.y.z must already exist)
CIT 384: Network AdministrationSlide #28 Classful and Classless Routing Classless routing: When a packet’s destination only matches default route, forward packet using default route. ip classless Classful routing: When a packet’s destination only matches default route, only use the default route if this router does not know any routes in the classful network in which the destination IP address resides. no ip classless
CIT 384: Network AdministrationSlide #29 Classful Routing R3 will use its default route only if it does not have another route for that address class; a single class-B route will prevent use of the default route for any network.
CIT 384: Network AdministrationSlide #30 Classful and Classless Routing R3#show ip route Gateway of last resort is to network /24 is subnetted, 4 subnets R [120/1] via , 00:00:13, Serial0.1 C is directly connected, Ethernet0 R [120/1] via , 00:00:06, Serial0.1 C is directly connected, Serial0.1 R3#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 84/89/114 ms R3#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:..... Success rate is 0 percent (0/5)
CIT 384: Network AdministrationSlide #31 Extended Ping Ping comes from interface closest to dest. Extended ping is configurable. –Alter source address to use different interface. –Can also modify Number of pings sent. Size of ping packets. Data included. Don’t fragment flag. Type of Service
CIT 384: Network AdministrationSlide #32 Extended Ping Albuquerque#show ip route /24 is subnetted, 5 subnets S [1/0] via S [1/0] via C is directly connected, Ethernet0 C is directly connected, Serial1 C is directly connected, Serial0 Albuquerque#ping Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms Albuquerque#ping Protocol [ip]: Target IP address: (Ethernet0 on Yosemite) Extended commands [n]: y Source address or interface: (Ethernet0) Data pattern [0xABCD]: Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:..... Success rate is 0 percent (0/5)
CIT 384: Network AdministrationSlide #33 VLSM Variable Length Subnet Masking –Using more than one subnet mask in a single classful network. –Not supported by old protocols RIPv1, IGRP.
CIT 384: Network AdministrationSlide #34 Overlapping Subnets Subnets must not have overlapping addresses. Results in overlapping router table entries. Routing is not predictable in such a situation. Some hosts may only be accessible from some parts of the network. Determining overlap 1.Calculate subnet number and broadcast address of each subnet; this gives you the address range. 2.Compare address ranges of all subnets, looking for overlaps.
CIT 384: Network AdministrationSlide #35 Overlapping Subnets Example SubnetSubnet Number1 st AddressLast AddressBroadcast R1 LAN R2 LAN R3 LAN R1-R R1-R
CIT 384: Network AdministrationSlide #36 Designing a Subnetting Scheme Three subnets with prefix /24 ( ) Three subnets with prefix /26 ( ) Four subnets with prefix /30 ( )
CIT 384: Network AdministrationSlide #37 Route Summarization Combining routes to same destination. –Routes must be to adjacent subnets. –Reduces routing table size, improves perf. Manual –Admin does with ip summary-address Automatic –Handled by routing protocol. –Can break routing in discontiguous networks.
CIT 384: Network AdministrationSlide #38 Creating Summary Routes Seville(config)#interface serial 0/0 Seville(config-if)#ip summary-address eigrp Seville#show ip route Codes: C - connected, S - static, D - EIGRP, EX - EIGRP external... Gateway of last resort is not set /8 is variably subnetted, 9 subnets, 3 masks D /16 [90/ ] via , 00:00:36, Serial0/0 D /16 is a summary, 00:00:38, Null0 D /24 [90/ ] via , 00:00:36, Serial0/0 C /24 is directly connected, Loopback5 C /24 is directly connected, FastEthernet0/0 C /30 is directly connected, Serial0/0 C /24 is directly connected, Loopback7 D /30 [90/ ] via , 00:00:36, Serial0/0 C /24 is directly connected, Loopback
CIT 384: Network AdministrationSlide #39 Creating a Manual Summary 1.List all subnets you want to summarize. 2.Find first N bits of subnet numbers that are the same for all subnets. 3.Summary route subnet number is the in-common bits followed by all 0s. 4.Summary route subnet mask is N 1s followed by 32-N 0s. 5.Check work by comparing IP address range of summary subnet with summarized subnet ranges.
CIT 384: Network AdministrationSlide #40 Manual Summary Example Subnet Address: 0’s replace non-shared bits Broadcast Address: 1’s replace subnet address bits
CIT 384: Network AdministrationSlide #41 Autosummarization Classful routing protocols use static masks. –Cannot use route to /24. –Can only use /8 route. Albuquerque will send all 10 net traffic to Seville.
CIT 384: Network AdministrationSlide #42 Discontiguous Networks Albuquerque ends up with /8 routes –Balances packets between S0/0 and S0/1 –Applications lose ~50% of packets through A.
CIT 384: Network AdministrationSlide #43 Discontiguous Networks Albuquerque#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set /24 is subnetted, 3 subnets C is directly connected, Ethernet0/0 C is directly connected, Serial0/0 C is directly connected, Serial0/1 R /8 [120/1] via , 00:00:13, Serial0/1 [120/1] via , 00:00:04, Serial0/0
CIT 384: Network AdministrationSlide #44 Autosummarization Support RIPv1 always uses autosummarization. RIPv2 and EIGRP use autosummary default –Turn off with no auto-summary OSPF does not use autosummarization.
CIT 384: Network AdministrationSlide #45 References 1.Paul Albitz and Cricket Liu, DNS and BIND, 5 th edition, O’Reilly, James Boney, Cisco IOS in a Nutshell, 2 nd edition, O’Reilly, Cisco, Cisco Connection Documentation, Cisco, Internetworking Basics, k/ito_doc/introint.htm k/ito_doc/introint.htm 5.Wendell Odom, CCNA Official Exam Certification Library, 3 rd edition, Cisco Press, 2007.