Presentation is loading. Please wait.

Presentation is loading. Please wait.

DCN286 INTRODUCTION TO DATA COMMUNICATION TECHNOLOGY

Similar presentations


Presentation on theme: "DCN286 INTRODUCTION TO DATA COMMUNICATION TECHNOLOGY"— Presentation transcript:

1 DCN286 INTRODUCTION TO DATA COMMUNICATION TECHNOLOGY
IP Routing and subnet We are going to introduce Router fundamental and subnet

2 TCP/IP model Application Transport Internet Network Interface
Presentation Session Transport Network Data Link Physical TCP/IP is the internet protocol and it is presented in layer model for easy understanding. The main models are DoD (Department of Defense) 4 layers and ISO (International Standard Organization) 7 layers model. Most popular model is the OSI/ISO 7-layer model The Application Layer can include things like File Transfers, and display formatting. HTTP is an example of an Application Layer protocol. Presentation Layer: Other than data sent/accepted to/from the application layer and Session Layer, this layer is reserved for certain kinds of data manipulation or consistent data types being encapsulated for transmission. Translations could possibly be made between ASCII and Unicode or even EBCIDIC if hexadecimal values for letter were being transmitted. Deal with creating a session, transmission of data, and then tear down of the created session. Sessions are created and terminated at the request of the Presentation Layer as it has data needing to be passed on to a different location. Another service that is offered as a part of the Session Layer might include data synchronization. Checksums may also be included at the Session Layer as a part of data synchronization. Transport Layer must create a connection of the type needed by the Session Layer for each connection requested by the Session Layer. Network layer is responsible for IP addressing, routing Data link layer is packaging bits into cells, or frames. Physical layer is responsible for moving bits across a shared media between two points.

3 TCP/IP protocol suite Telnet, HTTP, HTTPS, FTP, SNMP, POP3, IMAP, etc, etc are protocols working in Application layer. ARP, proxy ARP, RARP, ATM, Frame Relay, SLIP and PPP are all working in network access layer

4 TCP/IP Internet Layer Defines how to deliver data from one host to another on various physical networks: Logical addressing Routing and routing protocol Main protocols: IP, ARP, RARP (Reverse Address Resolution Protocol), ICMP (Internet Control Message Protocol) and router protocols such as RIP (Routing Information Protocol) and OSPF (Open Shortest Path First). PDU (Protocol Data Unit) is packet in layer 3 The layer will specify logical rules to work together with different physical networks. We will introduce IP Addressing and routing basic in next slides. Local addressing schema will tolerate various physical networks.

5 Switching Switching is redirecting according to MAC address.
Switching is functioning only in Ethernet. (Please recall that Data Link header is also called as Ethernet header.) Switching is in layer 2 Data Link layer Switching is faster than routing Switch can separate collision domain. One popular interview question would be “what is the difference between switching and routing?”.

6 Routing If all traffics are in the same LAN (subnet), no routing is required. The computers talk to each other over network cable directly. Only internetwork (between different networks), the routing is required. Router can divide broadcast domain. Router can offer stronger security protection. Routing table could be updated by i) network engineer manually, or ii) routing protocols dynamically. Router will use routing protocol to do the routing job between different networks. In same LAN (subnet), no routing is required. If the LAN is divided into different subnets, routing is necessary. To show a routing table in your Windows computer: Start  Cmd  Ok  run command “route print” More details would be introduced next class.

7 Routable and routing procotol
Routable protocol: To redirect (forward) traffic to other networks according to the routing path defined by routing protocol. Example: TCP/IP, IPX/SPX. Routing protocol: To dynamically define, update and distribute the best (lowest cost) routing path between networks. Example: RIP, IGRP, EIGRP, OSPF and BGP, etc, etc. Routing table is to contain the final information. It is possible to have multiple entries with same routing costs. We will introduce those routing protocol soon. RIP (Routing Information Protocol), IGRP (Interior Gateway Routing Protocol), EIGRP (Enhanced Interior Gateway Routing Protocol), OSPF (Open Shortest Path First) and BGP (Border Routing Protocol)

8 Routing table is a small in-memory database managed by the router's built-in hardware and software Contains destination network information In Microsoft OS computer, route command is used to manage routing table.

9 Example of routing table
The IP routing table contains information in the following columns: Destination The destination is the destination host, subnet address, network address, or default route. The destination for a default route is Network mask The network mask is used in conjunction with the destination to determine when a route is used. For example, a host route has a mask of , a default route has a mask of , and a subnet or network route has a mask between these two extremes. A mask of means that only an exact match of the destination uses this route. A mask of means that any destination can use this route. When a mask is written in binary, a 1 is significant (must match) and a 0 is insignificant (does not need to match). For example, a destination of has a network mask of This network mask means that the first two octets must match exactly, the first five bits of the third octet must match (248= ) and the last octet does not matter. The third octet of (that is, 8) equals in binary. Without changing the first 5 bits (the masked-off portion shown in bold), you can go up to 15, or in binary. So a route with a destination of and a mask of applies to all packets destined for through Gateway The gateway is the IP address of the next router where a packet needs to be sent. On a LAN link (such as Ethernet or token ring), the gateway must be directly reachable by this router by using the interface indicated in the Interface column. On a LAN link, both the gateway and interface determine how the traffic is being forwarded by the router. For a demand-dial interface, the gateway address is not configurable. On a point-to-point link, the interface determines how the traffic is being forwarded by the router. Interface(connected interface) The interface indicates the LAN or demand-dial interface that is to be used to reach the next router. Metric (cost) The metric indicates the relative cost of using the route to reach the destination. A typical metric is hops, or the number of routers to cross to reach the destination. If there are multiple routes with the same destination, the route with the lowest metric is the best route. Protocol The protocol shows how the route was learned. If the Protocol column lists RIP, OSPF, or anything other than Local, then the router is receiving routes. Open Shortest Path First (OSPF) is not available on Windows XP 64-bit Edition (Itanium) and the 64-bit versions of the Windows Server 2003 family.

10 Router Router (pronounced /'rautər/ in the USA and Canada, pronounced /'ru:tə/ in the UK and Ireland, or either pronunciation in Australia): a networking device whose software and hardware are usually tailored to the tasks of routing and forwarding information. To be able to route packets, a router must know, at a minimum, the following: Destination address Neighbor routers from which it can learn about remote networks Possible routes to all remote networks The best route to each remote network How to maintain and verify routing information Again, who can produce router? Sure, Cisco. The upper picture shows Cisco 7600 series. Who else? The lower picture shows Notel ERS8600 router. Who else?

11 Routing process (1) 1. Router receive frame Ethernet Header IP Packet
Trailer Preamble 7 bits SFC 1 bit Destination 6 Source Length 2 Data and Pad FCS 4 2. Router de-encapsulate packet (TTL-1) Before that, sender knows the IP address of default gateway. Based on the IP address, sender also knows default gateway MAC address via ARP. TTL (Time to Live) is the value of packet life. It would be decreased in the travelling. When TTL=0, i) discard the packet (no traffic moving any more, died) ii) return an error message (whatever unreachable).

12 Routing process (2) 3. Router review routing table and find the right path including the next interface to which the packet needs to be sent to 4. Find out MAC address of destination interface by ARP Each router also has a default routing path. If it cannot find the right direction, forward to default routing path anyway. By those intermediate routers’ help, the frame would be sent to the final destination network. The routing table is updated either manually by technician or dynamically by routing protocols. PPP (Point to Point Protocol) and WAN link protocols are used to routing between WAN networks. 5. Re-encapsulate the IP packet in a new frame with the new source and destination MAC address. In the new frame, IP address information does not have change. 6. Send out the frame from the destination interface

13 Static routing Routing table could be updated by i) network engineer manually, or ii) routing protocols dynamically. Static route is to use command manually create or update routing entries in routing table. Pros: Securer (Only network engineer can modify) Faster (No need for any further processing or calculation) Cons Hard to expand Wrongly configure is hard to troubleshooting To set up static routing: In Cisco router, the command is “ip route “; In Microsoft computer, the command is “route” Idea used for : --Headoffice and remote branch offices. --Backup connection. --Special forwarding (spam server in front of mail server)

14 Routing table fields Source Subnet Mask Out Int (Output Interface)
Next-Hop (forward destination) We can easily review the information by “show ip route” in Cisco routers or “route print” on computers running Windows OS.

15 IP Route command (1) - Optional
To specify routes by output interfaces: router>en Router#conf t Router(config)#ip route s0/0 In such case, any packets which need to be routed to (destination), will be directed via interface serial port s0/0.

16 IP Route command (2) - Optional
Determine next hope router>en Router#conf t Router(config)#ip route is the router interface ip address of next hop. Beyond this point, it is not the job of current router. Next-hop will look for better route based on its routing table.

17 IGP (Interior Gateway Protocols) / EGP (Exterior Gateway Protocols)
Routing protocols could be divided in Interior or Exterior routing protocols. IGP (Interior Gateway Protocols) works in a single Autonomous System (AS). Examples are RIP, OSPF, IGRP, EIGRP, etc, etc. EGP (Exterior Gateway Protocols) works between Autonomous Systems. The only viable example is BGP (Border Gateway Protocol) AS could be public AS or private AS. It is logical unit. In general, AS could be managed by a ISP or a company.

18 Route table calculation (optional)
Each router  contains  two  lists:  Tentative  and  Confirmed Each  list  contains  a  set  of  triples - (Destination,  Cost,  NextHop) Note  that  "NextHop"  is  the  first  router  on  the  path  from  the  source  S  to  Destination After calculation, each router would build up its own list. After considering up and down state, the potential path costs are calculated. Path 1 : ABCZ cost 200 Path 2 : AUVWXYZ cost 120 (best path) Path 3: AEZ cost 320 If V is down, U and W will flood changes out. SPF calculation will be run again. Path 1 would be the best option.

19 Routing updates Periodically update
Declare route unusable without updates Remove route entry after it was not usable for sometimes. Update timer time between each update default = 30s Invalid timer “margin of error” for update default = 180s Hold-down timer route declare unusable default = 180s Flush timer remove route default = 240s

20 VLSM (Variable Length Subnet Mask)
Different to traditional classful subnet mask (class A – ; class B – ; class C – ), VLSM is to support subnet and it is classless as its network mask could be Old routers only support classful routing. The network mask is not included in routing update information. New router supports VLSM and mask is a part of update information.

21 Valid network mask Binary value Decimal value 00000000 10000000 128
128 192 224 240 248 252 254 255 Any other value would be invalid mask. It is impossible to have (204) as a mask value.

22 IP address class Traditionally, the IP address was classified in classes: Class A: network 1 – 126 with subnet mask (Initial bit starts as 0) Class B: network 128 – 191 with subnet mask (Initial bit starts as 10) Class C: network 192 – 223 with subnet mask (Initial bit starts as 110) Class D: network 224 – 239 (Initial bit starts as 1110) for multicast IP address Class D: network 240 – 255 (Initial bit starts as 1111) experimental use The special network 0 and127 are not included in those official classical IP address is the loopback address which is used to test TCP/IP stacks. Based on the slide, you should understand that is a class A IP address; is a class B and is a class C address.

23 Subnet Subnet is to logically divide your network into many sub networks. In the same subnet, traffic is “local” and not gateway (router) is required. Network hosts would use ARP table for the MAC address of the destination machine and send the packet to it accordingly. If it is not local, packets would be forwarded to default gateway for future routing (redirecting). In addition, the broadcast would be limited to the small subnets leading to less “noise” in the network traffic. You can also use subnet to logically specify hosts for different departments. (for security control, connection, asset management, etc, etc) Subnet is to use the classless network mask. The classful mask is 8 (class A), 16 (class B) and 24 (class C). Subnet mask could be any number such as 9 bits ( ),

24 Power calculation of 2 The powers of 2 Decimal value Binary Value 2^0
1 2^1 2 2^2 4 2^3 8 2^4 16 2^5 32 2^6 64 2^7 128 2^8 256 2^9 512 2^10 1024 2^11 2048 2^12 4096 2^13 8192 Put the 0 on the right side of the 1 according to the power number. For instance, 2^3. We put 3 “0”s at the right side of 1  Without calculation, we can say that 2^11  (11 “0”). We have to be very good at decimal and binary conversion.

25 Subnet calculation Network address design would decide how many subnets would be yield for the additional subnet mask. Or, network design needs to make sure how many hosts could be placed in each subnet. Based on subnet calculation, find out network address and broadcast in each subnet. (Those two IP address cannot be used by any host.) Subnet number: The numerically lowest number in a subnet to present the IP Subnet. Subnet broadcast address: The numerically highest number in a subnet. If a packet is sent to this address, it would be forwarded to all hosts in the IP Subnet. Subnet zero (zero subnet): The numerically smallest subnet number in any subnet scheme. It has all “0” in subnet portion. With classful IP addressing, it is one of the two reserved subnets and should not be used. Broadcast subnet: The numerically largest subnet number in any subnet scheme. It has all “1” in subnet portion. With classful IP addressing, it is one of the two reserved subnets and should not be used.

26 Several terms Subnet number: The numerically lowest number in a subnet to present the IP Subnet. Subnet broadcast address: The numerically highest number in a subnet. If a packet is sent to this address, it would be forwarded to all hosts in the IP Subnet. Subnet zero (zero subnet): The numerically smallest subnet number in any subnet scheme. It has all “0” in subnet portion. With classful IP addressing, it is one of the two reserved subnets and should not be used. Broadcast subnet: The numerically largest subnet number in any subnet scheme. It has all “1” in subnet portion. With classful IP addressing, it is one of the two reserved subnets and should not be used. In real world, there are two calculation formula from MS and Cisco. Old Cisco router only support classful network. They deduct 2 from the network calculation. But, new routers can support VLSM which can use the zero subnet and the broadcast subnet. We are using Cisco way in DCN286

27 Define subnet number Subnet bits (“1”) can tell how many subnet could be produced by the mask. The formula is 2^(number of subnet “1” bits) - 2 Original classfull network mask: Class A network has the form N.H.H.H, the default subnet mask is 8 bits long. Class B network has the form N.N.H.H, the default subnet mask is 16 bits long. Class C network has the form N.N.N.H, the default subnet mask is 24 bits long. The additional subnet bits can generate subnet. For instance, You have an IP of with a subnet mask of 7 bits. How many hosts and subnets are possible? There is additional 7 bits to the default subnet mask. The total number of bits in subnet are 16+7 = 23. This leaves us with =9 bits for assigning to hosts. 7 bits of subnet mask corresponds to (2^7-2)=128-2 = 126 subnets. 9 bits belonging to host addresses correspond to (2^9-2)=512-2 = 510 hosts. Please be familiar with different subnet mask format. Decimal style: Binary style: CIDR -- Classless InterDomain Routing format: /xx such as /8, /11 in which the number means how many bits would be 1. The /8  

28 Define host number in each subnet
Subnet bits (“0”) can tell how many host could be contained in each subnet. The formula is 2^(number of host “0” bits) - 2 Original classfull network mask: Class A network has the form N.H.H.H, the default host mask is 24 bits long. Class B network has the form N.N.H.H, the default host mask is 16 bits long. Class C network has the form N.N.N.H, the default host mask is 8 bits long. The additional subnet bits can generate subnet. For instance, You have an IP of with a subnet mask of 7 bits. How many hosts and subnets are possible? There is additional 7 bits to the default subnet mask. The total number of bits in subnet are 16+7 = 23. This leaves us with =9 bits for assigning to hosts. 7 bits of subnet mask corresponds to (2^7-2)=128-2 = 126 subnets. 9 bits belonging to host addresses correspond to (2^9-2)=512-2 = 510 hosts. Please be familiar with different subnet mask format. Decimal style: Binary style: CIDR -- Classless InterDomain Routing format: /xx such as /8, /11 in which the number means how many bits would be 1. The /8  

29 Increment Number in Class C
Increment number (magic #) is 2^(8-number_of_subnet_bits). Or, 256 – subnet mask. For instance, You have an IP of with a subnet mask of 3 bits. What is the increment number? Beside the traditional class C network mask The 3 bits means that the mask is Increment number is 256 – 224 = 32. Or, 2^(8-3) = 32 The increment number could be used to find all subnet numbers. Class A and B increment number might be a little more complicated.

30 Increment Number in Class B (1) optional
Class B – borrowing in the 3rd octet Borrow 3 bits Subnet Mask = Number of networks created 2^3-2 = 6 (Microsoft way is 2^3=8) Number of useable networks created 2^3 = 8 – 2 = 6 Number of host per network 2^5 X 256 = 8192 The increment for each network is 32 in the 3rd octet (the number of unmasked bits in the 3rd octet is 5, this is the octet we borrowed from) If you need to determine the network number of subnet 6, multiply 6 X 32 = 192. The subnet 6 network address would be If you are borrowing in the 3rd octet, just ignore the 4th octet to determine your network numbers. The increment number could be used to find all subnet numbers. Class A and B increment number might be a little more complicated. In class B, if you are borrowing in the 3rd octet, just ignore the 4th octet to determine your network numbers.

31 Increment Number in Class B (2) optional
Class B – borrowing all the 3rd octet Borrow 8 bits Subnet Mask = Number of networks created 2^8 = 256 Number of useable networks created 2^8 - 2 = 256 – 2 = 254 Number of host per network 2^0 X 256 = 256 The increment for each network is 256 in the 3rd octet. (The number of unmasked bits in the 3rd octet is 0, this is the octet we borrowed from. This means that the value of the 3rd octet increases by one each time.) If you need to determine the network number of subnet 26, simply insert that number into the 3rd octet slot. The subnet 26 network address would be If you need to determine the network number of subnet 100, simply insert that number into the 3rd octet slot. The subnet 100 network address would be The increment number could be used to find all subnet numbers. Class A and B increment number might be a little more complicated. In such case, it sounds like a class C network.

32 Increment Number in Class B (3) optional
Class B – borrowing in the 4th octet Borrow 11 bits Subnet Mask = Number of networks created 2^ = (or 2^3 X = = 2046) Number of useable networks created 2^ = 2048 – 2 = 2046 Number of host per network 2^5 = 32 The increment for each network is 32 in the 4th octet. (The number of masked bits in the 4th octet is 3, the number of unmasked bits in the 4th octet is 5, this is the last octet we borrowed from. This means that the value of the 4th octet increases by the increment value.) 1. If you need to determine the network number of subnet 325, do the following: Divide the desired subnet by 2 raised to the masked bits in the 4th octet 325 / 2^3 or 325 / 8 = 40 remainder 5 The 40 is the value of the 3rd octet ? To find the value of the 4th octet multiply the remainder (5) times the increment (32) 32 X 5 = This is the value of the 4th octet The subnet 325 network address would be 2. If you need to determine the network number of subnet 40, do the following: 40 / 2^3 or 40 / 8 = 5 remainder 0 The 5 is the value of the 3rd octet ? To find the value of the 4th octet multiply the remainder (0) times the increment (32) 32 X 0 = 0 This is the value of the 4th octet The subnet 40 network address would be The increment number could be used to find all subnet numbers. Class A and B increment number might be a little more complicated. In such case, it sounds like a class C network.

33 Find the subnet address info
Increment number (magic #) is 2^(8-number_of_subnet_bits). Or, 256 – subnet mask. The zero subnet is as same as the original classful network address Add increment number to the zero subnet will get 1st subnet number, adding increment number to 1st subnet will get 2nd subnet number, etc, etc,. Broadcast address of each subnet is the address before next subnet number. After define the subnet number and broadcast address in the subnet, the address range for the host will be defined in the subnet. Please be familiar with different subnet mask format. Decimal style: Binary style: CIDR -- Classless InterDomain Routing format: /xx such as /8, /11 in which the number means how many bits would be 1. The /8  

34 Subnet calculation example
/27 ( ) 2^3 – 2 = 6 subnets Increment number is =32 # of subnet Subnet Lowest HOST IP address Highest HOST IP address Broadcast address 1 2 3 4 5 6 Broadcast subnet You can find that each column can be calculated in the same manner, adding the increment number, 32.

35 Boolean AND When two bits (binary numbers) are in such logical calculation: If both bits are 1, final result is 1. Otherwise, final result is 0. For example, = 1; = 0; 0 + 1=0 0 + 0 =0

36 Find resident subnet Convert the questioned host IP address and subnet mask into binary. Add them together by using Boolean AND calculation. Convert binary result to decimal value and it presents the resident subnet of the host. Which subnet is in when subnet mask is ? 1st Octet 2nd Octet 3rd Octet 4th Octet IP address Mark Calculation Result Decimal of the subnet number 192 168 10 96 From previous calculation, we know that the host is in 3rd subnet with network number It confirms the calculation

37 Subnet calculation clarification
In real world, you may hear the argument of subnet calculation: Microsoft: Number of subnets: 2^(number-of-subnet-bits) This is the number of subnets that are created. Cisco: Number of subnets: 2^(number-of-subnet-bits – 2) This is the number of subnets you can use to connect devices. In fact, in the VLSM supported environment, it is possible to use the subnet zero. But, you can never tell what other equipments are being used. On safe side, use 2^# -2 as your formula. In DCN286, remember using it as well as we are in Cisco class.

38 Network address questions
Write the subnet, broadcast address, and valid host range for each of the following: , with 4 bits of subnetting , with 3 bits of subnetting Review my slides; Answer is in next slides.

39 Answer of q1 : Subnet is , broadcast is , and valid host range is through 126. You need to ask yourself, “Is the subnet bit in the fourth octet on or off?” If the host address has a value of less than 128 in the fourth octet, then the subnet bit must be off. If the value of the fourth octet is higher than 128, then the subnet bit must be on. In this case, the host address is 10.5, and the bit in the fourth octet must be off. The subnet must be

40 Answer q 2 and 3 : Subnet is , broadcast is , and valid host range is through − 224 = = 64—bingo. The subnet is 10.32, and the next subnet is 10.64, so the broadcast address must be : Subnet is , broadcast is , and valid host range is through − 192 = = 128, so the network address must be , with a broadcast of

41 Answer of Q4 -6 : Subnet is , broadcast is , and valid hosts are and − 252 = = 8, plus 4 = 12, plus 4 = 16, plus 4 = 20—bingo. The subnet is , and the broadcast must be : Subnet is , broadcast is , and valid host range is through − 240 = = 32, plus 16 = 48. Subnet is ; broadcast is : Subnet is , broadcast is , and valid hosts are and − 252 = = 8, plus 4 = 12, plus 4 = 16, plus 4 = 20, plus 4 =24, plus 4 = 28. Subnet is ; broadcast is

42 Answer of Q7-8 , with 4 bits of subnetting: Subnet is , broadcast is , and valid host range is through − 240 = = 32. Subnet is, then, , with a broadcast of because 32 is the next subnet. , with 3 bits of subnetting: Subnet is , broadcast is , and valid host range is through − 224 = = 64, plus 32 = 96. Subnet is , and broadcast is

43 Question Any question? If you do not have question, please search internet and collect more information of router and its manufacturers. Please be comfortable to introduce routing protocols. Please be familiar with subnet calculation. The major difference between self-study and lecture class is that you can ask question and get answer from instructor who usually has more professional skills and knowledge. Be comfortable to tell at least 3 – 5 router manufactures.


Download ppt "DCN286 INTRODUCTION TO DATA COMMUNICATION TECHNOLOGY"

Similar presentations


Ads by Google