450 likes | 593 Views
CIT 384: Network Administration. Routing ][. Topics. Switch Forwarding Process IP Routing Process DNS Connected and Static Routes Classful Routing VLSM Summarization. Switch Forwarding Process. Determine the VLAN in which the frame should be forwarded as follows:
E N D
CIT 384: Network Administration Routing ][ CIT 384: Network Administration
Topics • Switch Forwarding Process • IP Routing Process • DNS • Connected and Static Routes • Classful Routing • VLSM • Summarization CIT 384: Network Administration
Switch Forwarding Process • Determine the VLAN in which the frame should be forwarded as follows: • If frame arries on an access interface, use the interface’s access VLAN. • If frame arrives on a trunk interface, use VLAN listed in trunking header. • 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. • If incoming interface is not in an STP Forwarding State for that VLAN, discard the frame. • Look for destination MAC address of frame in MAC address table for VLAN identified in step 1. If address is • Found: Forward frame out the only interface listed in the matched address table entry. • Not found: Flood frame out all other access ports in same VLAN and out all trunk ports that support this VLAN. CIT 384: Network Administration
IP Routing Process: Edge Hosts • Compare destination IP of packet to local subnet and netmask. • If destination on same subnet as host, send packet directly to host. ARP is used to find destination MAC address. • 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 Administration
IP Routing Process: Routers • Check errors using data link FCS. If error, discard frame. • Check frame’s destination MAC address, and process only if directed to this router or to a broadcast/multicast address. • Discard frame’s old data-link header and trailer, leaving IP packet. • Compare destination IP address to routing table, finding route that matches destination address. Route identifies outgoing interface of router and possibly next-hop router. • Determine destination MAC address. • Encapsulate packet inside new data link header and trailer, appropriate for outgoing interface, and fwd packet. CIT 384: Network Administration
IP Routing Example PC1 sends packet to PC3 (172.16.3.3) • PC1 configuration • ifconfig eth0 172.16.1.1 netmask 255.255.255.0 • route add default gw 172.16.1.251 • Compares 172.16.3.3 to local net: • Network address: 172.16.1.0 • Subnet mask: 255.255.255.0 • Since 172.16.3.3 is not in address range, • Sends to default route 172.16.1.251 CIT 384: Network Administration
IP Routing Example: R1 • R1 checks FCS, finds no errors. • R1 finds its own fa0/0 MAC as dest MAC, so it will process the frame. • R1 discards old data-link header and trailer. • R1 compares dest IP (172.16.3.3) to routing table, finding a route for 172.16.3.0 with netmask 255.255.255.0. • R1 looks up MAC address of route destination (172.16.2.252) in ARP table. • R1 encapsulates IP packet in new Ethernet frame, with R1’s fa0/1 MAC address as destination. CIT 384: Network Administration
IP Routing Example: R2 • R2 checks FCS, finds no errors. • R2 finds own fa0/0 MAC address as destination MAC, so it will process frame. • R2 discards old data-link header and trailer. • R2 compares destination IP (172.16.3.3) to routing table, finding matching route with outgoing interface fa0/1. • R2 looks up destination IP’s MAC address. • 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 Administration
Routing Example with PPP CIT 384: Network Administration
Matching the Most Specific Route R1#show ip route rip 172.16.0.0/16 is variably subnetted, 5 subnets, 4 masks R 172.16.1.1/32 [120/1] via 172.16.25.2, 00:00:04, Serial0/1/1 R 172.16.1.0/24 [120/2] via 172.16.25.129, 00:00:09, Serial0/1/0 R 172.16.0.0/22 [120/1] via 172.16.25.2, 00:00:04, Serial0/1/1 R 172.16.0.0/16 [120/2] via 172.16.25.129, 00:00:09, Serial0/1/0 R 0.0.0.0/0 [120/3] via 172.16.25.129, 00:00:09, Serial0/1/0 R1#show ip route 172.16.4.3 Routing entry for 172.16.0.0/16 Known via "rip", distance 120, metric 2 Redistributing via rip Last update from 172.16.25.129 on Serial0/1/0, 00:00:19 ago Routing Descriptor Blocks: * 172.16.25.129, from 172.16.25.129, 00:00:19 ago, via Serial0/1/0 Route metric is 2, traffic share count is CIT 384: Network Administration
Ranges defined by each route 172.16.1.1 172.16.1.0 – 172.16.1.255 172.16.0.0 – 172.16.3.255 172.16.0.0 – 172.16.255.255 0.0.0.0 – 255.255.255.255 CIT 384: Network Administration
Matching the Most Specific Route 172.16.1.1: Matches all 5 routes Longest prefix is /32, route to 172.16.1.1/32 172.16.1.2: Matches last 4 routes Longest prefix is /24, route to 172.16.1.0/24 172.16.2.3: Matches last 3 routes Longest prefix is /22, route to 172.16.0.0/22 172.16.4.3: Matches last 2 routes Longest prefix is /16, route to 172.16.0.0/16 CIT 384: Network Administration
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 Administration
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 Administration
The DNS Namespace CIT 384: Network Administration
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 Administration
Delegation of Domains • Top Level Domains delegate subdomains to organizations. • Organizations can delegate subdomains of their domain too. CIT 384: Network Administration
Name Resolution Process • Resolver on host translates hostnames for apps. • Resolver asks nameserver to translate for it. • Nameserver asks root server, with refers it to au svr. • Au server refers to gov.au server. • Gov.au server refers to gbrmpa.gov.au server. • Gbrmpa.gov.au server returns IP address to nameserver. • Nameserver may cache translation for future use. • Nameserver sends IP address to resolver. CIT 384: Network Administration
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 Administration
Maximum Transmission Unit (MTU) router(config)# interface fa0/1 router(config-if)# mtu 1000 router(config-if)# end CIT 384: Network Administration
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 Administration
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 10.11.241.1 to network 0.0.0.0 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 10.11.241.0/24 is directly connected, FastEthernet0/0 C 10.251.0.0/16 is directly connected, FastEthernet0/1 S* 0.0.0.0/0 [1/0] via 10.11.241.1 CIT 384: Network Administration
show ip route address Router-251>show ip route 10.11.241.9 Routing entry for 10.11.241.0/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 144.144.144.144 % Network not in table CIT 384: Network Administration
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 Administration
Creating a Static Route ip route network subnet destination ip route 10.1.0.0 255.255.0.0 10.1.0.1 ip route 10.6.9.0 255.255.255.0 10.6.9.95 ip route 10.2.0.0 255.255.0.0 fa0/1 CIT 384: Network Administration
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 0.0.0.0 0.0.0.0 10.9.3.1 Configuring a default route for routing protocols ip default-network 10.0.0.0 (a route to 10.x.y.z must already exist) CIT 384: Network Administration
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 Administration
Classful Routing R3 will use its default route only if it does not have another route for that address class; a single class-B 168.13 route will prevent use of the default route for any 168.13 network. CIT 384: Network Administration
Classful and Classless Routing R3#show ip route Gateway of last resort is 168.13.100.1 to network 0.0.0.0 168.13.0.0/24 is subnetted, 4 subnets R 168.13.1.0 [120/1] via 168.13.100.1, 00:00:13, Serial0.1 C 168.13.3.0 is directly connected, Ethernet0 R 168.13.2.0 [120/1] via 168.13.100.2, 00:00:06, Serial0.1 C 168.13.100.0 is directly connected, Serial0.1 R3#ping 10.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 84/89/114 ms R3#ping 168.13.200.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 168.13.200.1, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) CIT 384: Network Administration
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 Administration
Extended Ping Albuquerque#show ip route 10.0.0.0/24 is subnetted, 5 subnets S 10.1.3.0 [1/0] via 10.1.130.253 S 10.1.2.0 [1/0] via 10.1.128.252 C 10.1.1.0 is directly connected, Ethernet0 C 10.1.130.0 is directly connected, Serial1 C 10.1.128.0 is directly connected, Serial0 Albuquerque#ping 10.1.2.252 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.2.252, 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: 10.1.2.252 (Ethernet0 on Yosemite) Extended commands [n]: y Source address or interface: 10.1.1.251 (Ethernet0) Data pattern [0xABCD]: Sending 5, 100-byte ICMP Echos to 10.1.2.252, timeout is 2 seconds: . . . . . Success rate is 0 percent (0/5) CIT 384: Network Administration
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 Administration
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 • Calculate subnet number and broadcast address of each subnet; this gives you the address range. • Compare address ranges of all subnets, looking for overlaps. CIT 384: Network Administration
Overlapping Subnets Example CIT 384: Network Administration
Designing a Subnetting Scheme • Three subnets with prefix /24 (255.255.255.0) • Three subnets with prefix /26 (255.255.255.192) • Four subnets with prefix /30 (255.255.255.252) CIT 384: Network Administration
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 Administration
Creating Summary Routes Seville(config)#interface serial 0/0 Seville(config-if)#ip summary-address eigrp 1 10.3.0.0 255.255.0.0 Seville#show ip route Codes: C - connected, S - static, D - EIGRP, EX - EIGRP external ... Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 9 subnets, 3 masks D 10.2.0.0/16 [90/2684416] via 10.1.6.1, 00:00:36, Serial0/0 D 10.3.0.0/16 is a summary, 00:00:38, Null0 D 10.1.1.0/24 [90/2195456] via 10.1.6.1, 00:00:36, Serial0/0 C 10.3.5.0/24 is directly connected, Loopback5 C 10.3.4.0/24 is directly connected, FastEthernet0/0 C 10.1.6.0/30 is directly connected, Serial0/0 C 10.3.7.0/24 is directly connected, Loopback7 D 10.1.4.0/30 [90/2681856] via 10.1.6.1, 00:00:36, Serial0/0 C 10.3.6.0/24 is directly connected, Loopback CIT 384: Network Administration
Creating a Manual Summary • List all subnets you want to summarize. • Find first N bits of subnet numbers that are the same for all subnets. • Summary route subnet number is the in-common bits followed by all 0s. • Summary route subnet mask is N 1s followed by 32-N 0s. • Check work by comparing IP address range of summary subnet with summarized subnet ranges. CIT 384: Network Administration
Manual Summary Example 0000 1010 0000 0010 0000 0 001 0000 0000 10.2.1.0 0000 1010 0000 0010 0000 0 010 0000 0000 10.2.2.0 0000 1010 0000 0010 0000 0 011 0000 0000 10.2.3.0 0000 1010 0000 0010 0000 0 100 0000 0000 10.2.4.0 Subnet Address: 0’s replace non-shared bits 0000 1010 0000 0010 0000 0 000 0000 0000 10.2.0.0 Broadcast Address: 1’s replace subnet address bits 1111 1111 1111 1111 1111 1 000 0000 0000 255.255.248.0 CIT 384: Network Administration
Autosummarization Classful routing protocols use static masks. • Cannot use route to 10.3.4.0/24. • Can only use 10.0.0.0/8 route. Albuquerque will send all 10 net traffic to Seville. CIT 384: Network Administration
Discontiguous Networks Albuquerque ends up with 2 10.0.0.0/8 routes • Balances packets between S0/0 and S0/1 • Applications lose ~50% of packets through A. CIT 384: Network Administration
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 172.16.0.0/24 is subnetted, 3 subnets C 172.16.1.0 is directly connected, Ethernet0/0 C 172.16.2.0 is directly connected, Serial0/0 C 172.16.3.0 is directly connected, Serial0/1 R 10.0.0.0/8 [120/1] via 172.16.3.3, 00:00:13, Serial0/1 [120/1] via 172.16.2.2, 00:00:04, Serial0/0 CIT 384: Network Administration
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 Administration
References • Paul Albitz and Cricket Liu, DNS and BIND, 5th edition, O’Reilly, 2006. • James Boney, Cisco IOS in a Nutshell, 2nd edition, O’Reilly, 2005. • Cisco, Cisco Connection Documentation, http://www.cisco.com/univercd/home/home.htm • Cisco, Internetworking Basics, http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/introint.htm • Wendell Odom, CCNA Official Exam Certification Library, 3rd edition, Cisco Press, 2007. CIT 384: Network Administration