Integrated Network Services Network Design Almerindo Graziano Menu • Issues in Network Design • Designing an addressing scheme with IP4 – Classful vs Classless addressing • • • • How to choose and addressing scheme How to choose an adequate routing protocol Examples Recap Designing a new Network • How many networks do currently exist? • How many will exist in the next 3-12 months? • How many hosts on each network? • How many will exist in the next 3-12 months? – Is the number constant or does it vary with the network? • Does the logical topology reflect the physical topology? Designing a new Network • Do you have a client/server environment? – Where are the server located? – Do you need access every network from every network? • Any security issues? • Any mobile users? • Do you need Internet access? – Do you have your own NIC address or are you connected via an ISP • Which network protocol will you be adopting? Designing an Addressing Scheme with IP • Current version is IP4 • 32-bit long 232 binary combinations 4billion • 3 classes of addresses in use (Classful) – Class A – Class B – Class C 1.0.0.0 128.0.0.0 192.0.0.0 to to to 127.255.255.255 191.255.255.255 223.255.255.255 to to 239.255.255.255 247.255.255.255 • 2 additional classes – Class D – Class E 224.0.0.0 240.0.0.0 IP Classful Addresses 27-2 = 126 Networks 224-2= 16,777,214 hosts 214 = 16,384 Networks 216-2 = 65,534 Hosts 221 = 2,097,152 Networks 28-2= 254 Hosts Address Notation • An IP address can be written in two formats 143.52.57.32 Dotted Decimal 10001111.00110100.00111001.00100000 Binary IP4 addresses • Addresses allocated by IANA – APNIC (Asia-Pacific) – ARIN (American Registry for Internet Numbers) – RIPE (Reseu IP Europeens) Limitations • Lack of support for medium-size organization – Example: 300 hosts needed a Class B address – Rapid depletion of class B addresses • Large routing tables – No way to summarize large number of addresses • Routers DO need to know how to reach each network Next Step: Subnetting • How can we use our network address efficiently? – RFC 950 (subnetting) : use some of the host bits to represent a network – More freedom and flexibility within an organization (no need to speak to IANA) • Increased complexity within the organization – More stable routing tables (reduced flapping) – Still large routing tables CIDR • What do we do if we need 1600 addresses? • CIDR (Classless InterDomain Routing) • Why Classless – The network is not identified by the Class (first octect rule) – The network is identified by a subnet mask – The subnet mask identifies the boundary between the network part and the host part CIDR • A company needs 1600 address • In the old days: – 1600/254 = 6.29 7 Class C addresses – 7 Class C addresses 7 new entries on the Internet – Alternatively use 1 Class B address (What a waste!!) • Using CIDR – IANA releases 8 Class C addresses – 8 Class C addresses 1 new entry on the Internet CIDR example • RIPE will provide this address 200.128.48.0/21 The subnet mask is 255.255.248.0 Class C address 110010000.1000000.00110 000 .00000000 = 200.128.48.0 001 .00000000 = 200.128.49.0 010 .00000000 = 200.128.50.0 011 .00000000 = 200.128.51.0 100 .00000000 = 200.128.52.0 101 .00000000 = 200.128.53.0 110 .00000000 = 200.128.54.0 111 .00000000 = 200.128.55.0 • 8 Class C addresses are allocated to the company • Only 7 are used • Only one new entry is advertised to the internet CIDR Example CIDR • • • • • Summarization Smaller routing tables Less Memory Smaller routing tables Less CPU Smaller updates Less traffic More stable routing tables (not always good) – Unecessary traffic can traverse the network for a while Classless Routing • What happens if we decide to use different subnet mask? (Networks are different!!) – First routing protocols didn’t send the subnet mask (RIP1) • The mask was configured locally • No masks are associated with entries in the routing table • It is assumed that the same mask is used on the major network • The router has no way of knowing how many bits are used for the host – SHU uses 143.52.0.0/24 Classful Routing • Classful lookup: a packet arrives at in interface 1) The network portion of the destination address is read 2) If the there is no match for the major networks (A, B, C) the packet is dropped (ICMP) 3) A match is found for a major network - All the subnets listed for that network are examined - A match is found and the packet is routed - A match is not found and the packet is dropped • The destination address is interpreted according to the subnet masks locally configured on the router Classful and Classless Routing Protocols • Classless routing protocols send the subnet mask in their route advertisements • Benefits – All-zeros and All-ones subnets can be used 143.52.0.0/24 is an all-zeros subnet 143.52.0.0/16 is the major network number – It is possible to use VLSM (Variable Length Subnet Mask) – It is possible to summarize a group of major networks with one aggregate address • A classful routing protocol doesn’t advertise routes between interfaces whose mask don’t match Classful and Classless Routing Protocols • Examples of Classful routing protocols – RIP1 – IGRP – EGP • Examples of Classless routing protocols – – – – RIP2 OSPF EIGRP BGP4 Classless Routing • Classless lookup: a packet arrives at an interface • The router doesn’t pay attention to the class of the destination address • The router performs a bit-by-bit comparison between the destination address and all the routing entries Classless Routing: Example • A router has the following routing table . . . D 192.168.32.0/26 [90/25789217] via 10.1.1.1 R 192.168.32.0/24 [120/4] via 10.1.1.2 O 192.168.32.0/19 [110/229840] via 10.1.1.3 . . . • A packet arrives destined to 192.168.32.1 • Which network will it be forwarded to? VLSM • Using a single subnet mask has disadvantages – Inefficient use of address space – No summarization possible • Variable Length Subnet Mask (VLSM) – – – – Recursive division of an address space Allows route aggregation Efficient use of the address space Requires new-generation protocols (RIP2, OSPF, EIGRP etc.) Rules for VLSM • A subnet can be used for – Address host – Further subnetting • It is possible to use the all-zeros and all-ones subnets – The rule has to be obeyed only once! – Usually use the least significant bits VLSM: Example • A organization is spread across – England, Ireland, Scotland and Wales – In each of these countries the organization has a presence in no more than 3 towns – In each town the company has max 4 buildings (the number may increase) – No building has more than 4 floors – No floor has more than 20 hosts • The organization is assigned 143.52.0.0 VLSM: Example • Step 1 – Identify the number of bits we need for identifying Countries, Towns, Buildings etc. – We can play with 16 bits Host Floor Building Town Country 00110 010.100 00011 VLSM: Example • Step 2 – Identify where we will apply the subnet rule • We will use the floor bits • Step 3 – Identify addresses for WAN connections • Example: borrow a subnet from available ones: – 4 country Subnets – 1 town subnet per country – 2 floors per building • Document the choice made VLSM: Example NIC Number 143.52.0.0 Country: 000 001 010 011 100 101 110 111 143.52.0.0/19 143.52.32.0/19 143.52.64.0/19 143.52.96.0/19 143.52.128.0/19 143.52.160.0/19 143.52.192.0/19 143.52.224.0/19 Ireland Scotland Wales England not used not used not used not used VLSM: Example NIC Number 143.52.0.0 Town: 011/00 /01 /10 /11 Building 011/01/000 /001 /010 /011 /100 /101 /110 /111 143.52.96.0/21 143.52.104.0/21 143.52.112.0/21 143.52.120.0/21 London Sheffield Birmingham not used 143.52.104.0/24 143.52.105.0/24 143.52.106.0/24 143.52.107.0/24 143.52.108.0/24 143.52.109.0/24 143.52.110.0/24 143.52.111.0/24 Owen Howard Harmer Stoddart For future use For future use For future use For future use VLSM: Example NIC Number 143.52.0.0 Floors in the Harmer building 011/01/010./000 143.52.106.0/27 /001 143.52.106.32/27 /010 143.52.106.64/27 /011 143.52.106.96/27 /100 143.52.106.128/27 /101 143.52.106.160/27 /110 143.52.106.192/27 /111 143.52.106.224/27 Cannot be used 1st Floor 2nd Floor 3rd Floor 4th Floor not used not used Cannot be used VLSM: Example NIC Number 143.52.0.0 Hosts on the 4th floor in the Harmer building 011/01/010./100/00000 143.52.106.128/27 /00001 143.52.106.129 /00010 143.52.106.130 /00011 143.52.106.131 . . . . . . /11111 143.52.106.159 The Floor 1st host 2nd host 3rd host . . . Broadcast Interconnection Requirements • In each town the buildings are interconnected in a mesh via Frame Relay with dial-up connections for back up. – Each building needs 3(buildings) x 2 = 6 addresses • Potentially 7( buildings) x 2 = 14 addresses (if we have 8 buildings) – Each town needs 4(buildings) x 6 = 24 addresses • Potentially 8(buildings) x 14 = 112 addresses (if we have 8 buildings) • Each town has a central site, located within one of the buildings, which connects to the other towns via Frame_Relay with dial-up connections for back up – Each town needs at least 2(towns) x 2 = 4 addresses for serial connections – Each country needs a total of 3(towns) x 4 = 12 addresses for serial connections • Each town is connected to the rest of the company via an ISP, using VPN technology. Some resilience is also needed – Each country needs at least 3 x 2 = 6 addresses Total addresses per country = 112 + 12 + 6 = 130 Summary of requirements • Within each town we need: – 112 addresses between buildings (64 networks) • For each country we need: – 12 addresses for connections between towns (6 networks) – 6 addresses for connections between a town and the ISP (3 networks) • For each country we can use a different subnet of the ones available in the country subnets VLSM: Example NIC Number 143.52.0.0 Country: 000 001 010 011 100 101 110 111 143.52.0.0/19 143.52.32.0/19 143.52.64.0/19 143.52.96.0/19 143.52.128.0/19 143.52.160.0/19 143.52.192.0/19 143.52.224.0/19 Ireland Scotland Wales England Ireland connections Scotland connections Wales connections England connections Example: England 143.52.224.0/19 can be further subnetted for serial connections • 13 bits to play with • Each serial connection will have a subnet mask of /30 • We have 211 possible networks 143.52.111/00000.000000 00000.000001 00000.000010 00000.000011 00000.000100 00000.000101 . . . . 11111.111110 11111.111111 143.52.224.0/30 Cannot be used 143.52.224.4/30 143.52.224.8/30 143.52.224.12/30 143.52.224.16/30 143.52.224.20/30 . . . . 143.52.255.248/30 143.52.255.252/30 Cannot be used Recap • • • • • • • • Issues in Network design Designing an Addressing scheme with IP4 Subnetting CIDR Classful vs Classless VLSM Examples References: Understanding IP Addressing: Everything You Ever Wanted To Know. 3COM whitepaper • http://www.3com.com/other/pdfs/infra/corpinfo/en_US/501302.pdf