Network�Fundamentals Lecture�01:�Introduction�to� Networks IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� Module�Code�|�Module�Name�|�Lecture�Title�|�Lecturer NETWORKING�TODAY • Network�has�no�boundary�and�supports�the�way�we: ü Communicate ü Share ü Work ü Learn ü Play IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� NETWORKS • Networks�of�many�sizes ü Small�Home�/�Office�Networks ü Medium�to�Large�Networks ü World�Wide�Network • Clients�and�Servers • Peer-to-Peer IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� COMPONENTS�OF�THE�NETWORK�-� DEVICES ü End�devices ü Intermediate�devices IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� COMPONENTS�OF�THE�NETWORK� -�MEDIA • Provide�the�pathway�for�data�transmission • Interconnect�devices IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� NETWORK�MEDIA Wireless Copper�Cables IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� NETWORK�MEDIA�CONT. IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� NETWORK�SYMBOLS IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� TOPOLOGY�DIAGRAMS • Physical� topology� diagrams� -� Identify� the� physical� location� of� intermediary� devices�and�cable�installation. IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� TOPOLOGY�DIAGRAMS�CONT. • Logical�topology�diagrams�-�Identify�devices,�ports,�and�addressing�scheme.� IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� NETWORK�TYPES • Local�Area�Network�(LAN) • Wide�Area�Network�(WAN) IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� NETWORK�TYPES�CONT. • Intranets • Extranets IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� CONVERGED�NETWORKS • Traditional�Networks • The�Converging�Networks Capable�of�delivering�data,�voice,�and�video�over�the�same�network� infrastructure IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� RELIABLE�NETWORKS • Four�Basic�Characteristics�of�Network�Architecture ü Fault�Tolerance ü Scalability ü Quality�of�Service�(QoS) ü Security IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� ELEMENTS�OF� COMMUNICATION ü Message�source ü The�channel ü Message�destination ü Rules • Common�language�and�grammar • Speed�and�timing�of�delivery • Confirmation�or�acknowledgment�requirements IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� MESSAGE�DELIVERY� OPTIONS IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� • A�reference�model�defines�how�applications�can�communicate�over�a�network� (the�full�process) • A�layered�reference�model�divides�the�full�process�into�specific�related� groups of�actions�at�each�layer IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� • Provides�a�common�language�for�vendors • Fosters�competition�between�vendors • Changes�in�one�layer�do�not�affect�other�layers IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� • Open�standards�encourage�competition�and�innovation.� • Guarantee�that�no�single�company’s�product�can� monopolize�the�market • Standards�organizations�include: • The�Internet�Society�(ISOC)� • The�Internet�Architecture�Board�(IAB) • The�Internet�Engineering�Task�Force�(IETF) • The�Institute�of�Electrical�and�Electronics�Engineers� (IEEE) • The�International�Organization�for�Standardization�(ISO) IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� • Define�a�common�format�and�a�set�of�rules�for�the�data� communication IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� IE1020|�Network�Fundamentals�|�Communicating�Over�Networks|�Dr.� Network�Fundamentals� IE1020 Lecture�02:�ISO�-�OSI� reference�model IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� Module�Code�|�Module�Name�|�Lecture�Title�|�Lecturer ISO�-�OSI�REFERENCE� MODEL IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� UPPER�LAYERS IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER�CONT. • Closest�to�the�end�user. • Enables�the�user�(human�or�software)�to�access�the�network.� • Provides�user�interfaces�and�support�shared,�distributed�network�services. IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER� SERVICES § Web�and�e-mail�services § IP�addressing�services § File�sharing�services IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER� SERVICES�CONT. DNS�services IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER� SERVICES�CONT. DHCP�services IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER� PROTOCOLS IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER� SOFTWARE IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER� SOFTWARE�CONT. IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER� SOFTWARE�CONT. IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� APPLICATION�LAYER� SOFTWARE�CONT. IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� PRESENTATION�LAYER IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� PRESENTATION�LAYER IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� SESSION�LAYER IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� SESSION�LAYER IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� SESSION�LAYER�CONT. • Creates� and� maintains� sessions� (dialogs)� between� source� and� destination� applications. • A�session�is�a�series�of�interactions�between�the�source�and�destination�applications� that�occur�during�the�span�of�a�single�connection.� IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� SESSION�LAYER�CONT. • Session�layer�handles�the�exchange�of�information�to� ü initiate�dialog ü keep�them�active�(synchronize) ü restart�sessions�that�are�disrupted�or�idle IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� SESSION�LAYER�CONT. • A�computer�can�establish�multiple�sessions�with�several�other� computers Yaho o AOL ESP N IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� SESSION�LAYER�CONT. • Two�computers�can�establish�multiple�sessions mail music news IE1020|�Network�Fundamentals�|�ISO�-�OSI�reference�model|�Dr.�Windhya� Network Fundamentals Lecture 03: Transport Layer IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Transport Layer IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Transport Layer Responsibilities Tracking�conversations�(Processes) IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Transport Layer Responsibilities Cont. Tracking�conversations�(Processes):�port� addresses IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Transport Layer Responsibilities Cont. Tracking�conversations:�port�addresses IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Transport Layer Responsibilities Cont. Segmentation IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Transport Layer Responsibilities Cont. Segmentation Application�Layer Transport�Layer Segmentation MSS Header Network�Layer IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Transport Layer Protocols Media�Independence IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Transport Layer Protocols IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Transport Layer Protocols Cont. IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Transmission Control Protocol (TCP) IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP Features • Connection�Oriented ü Connection�establishment Stateful ü Data�transfer ü Connection�termination • Guaranteed�delivery� Acknowledgements,�Retransmission • Same-Order�delivery�(correct-order) Reliable • Flow�control IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP: Connection Oriented Client Connection� establishment SYN 1 time ACK Server 2 SYN ACK 3 4 IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP: Connection Oriented Cont. Client Connection� establishment SYN 1 time 3-Way� Handsh ake Server ACK + SYN ACK 2 3 IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP: Connection Oriented Cont. Data�transfer Client Data Server ACK • TCP�is�a�reliable�protocol. • TCP� sends� an� Acknowledgement� Data (ACK)� for� each� segment� of� received� data. ACK Data ACK IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP: Connection Oriented Cont. Data�transfer�cont. • Piggybacking:�Sending�(Data�and�ACK)�or� (SYN�and�ACK)�together.� Client Server Data TIME Data, ACK Data, ACK IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP: Connection Oriented Cont. Connection�termination IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP Guaranteed Delivery Acknowledgments�and Retransmission IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP Same Order Delivery IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP: Data transfer Server Client • Data�is�transferred�as�Segments SN=100 • Each� segment� is� given� an� identification� called�a�Sequence�Number • Each� acknowledgement� Data=200 bytes ACK is� given� an� AN=300 identification�called�an�Acknowledgement� Number • Acknowledgement�Number ü Next�expected�segment’s�sequence�number (Received�segment’s�sequence� number�+� No.� of�bytes�in�the� segment) IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP: Data transfer Cont. Server Client SN=100 • Sequence�Number� Data=200 bytes ACK ü ����Calculated�based�on�the�received�segment AN=300 (Received�segment’s�Acknowledgement�number) SN=300 Data=400 bytes ACK AN=700 IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP: Data transfer Cont. Server Client • Sequence�Number� SN=100 Data=200 bytes ü ����Calculated�based�on�the�received�segment (Received�segment’s�Acknowledgement�number) SN=300 Data=400 bytes OR ü ����Calculated� based� on� the� previously� sent� segment (Previously�� Sent� segment’s� sequence�number� +� No.� of� ACK AN=700 bytes�in�the�segment) ISN:�Very�1st�segments'�sequence�number,� Randomly�generated IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP States IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP States Cont. CLIE NT SERV ER CLOSE D Recv:� SYN Send:� SYN,ACK SYN_RCV D Recv:� ACK Recv:� SYN,ACK ESTABLISH ED Send:� FIN FIN_WAIT _1 Recv:� ACK FIN_WAIT _2 LISTE N Recv:� FIN Send:� ACK Send:� SYN 2MSL� timeout TIME_WAI T SYN_SE NT Send:� ACK Recv:� FIN CLOSE_W Send:� AIT ACK Send:�FIN Recv:� LAST_AC ACK K IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP Establishing a Session CLIEN T CLOS ED SYN_SE NT ESTABLISHE D SERV ER SYN CLOSE D LISTE N SYN_RC VD SYN,AC K ACK ESTABLIS HED Data ACK FIN_WAIT_ 1 FIN_WAIT_ 2 2MS L TIME_WAI T CLOS ED FIN CLOSE_WAI T ACK FIN ACK LAST_A CK CLOSE D IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP Header IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP Header Cont. Header�Length�(HLEN) • Indicates� the� length� of� the� TCP� header� by� number� of� 4-byte� words�in�the�header,� • If�the�header�is�20�bytes�(minimum�length�of�TCP�header),� HLEN�=�20/�4 �����������=�5��(0100b) • If�the�header�the�60�bytes�(maximum�length�of�TCP�header) HLEN�=�60/�4 If�the�header�is�60�bytes�(maximum�length�of�TCP� =�20�bytes�(standard�header)�+�40�bytes�(options �����������=�15�(1111b) IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP Header Cont. TCP�Control�bits IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP Header Cont. Window�Size:�TCP�Flow� Control TX� Buffer (500) Read�Data Serv er RX� Clie Buffer nt (500) SN=100 200 500 300 TX� Buffer (700) RX� Buffer (700) Data=200 bytes 200 700 500 ACK AN=300 300 SN=300 200 Sliding� Window Data=300 bytes 300 400 IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP Header Cont. Urgent�Pointer IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri TCP Header Cont. Options • If�the�header�is�60�bytes�(maximum�length�of�TCP�header) =�20�bytes�(standard�header)�+�40�bytes�(options�bytes) IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Applications that Use TCP IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri User Datagram Protocol (UDP) IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri UDP • UDP�Features • Simple�and�fast • Connectionless • Stateless • Best�effort�delivery:�Unreliable • UDP�Header • The� pieces� of� communication� in� UDP� are� called� Datagrams. • UDP�adds�only�8�bytes�of�overhead�(header�is�8�bytes) IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri UDP Header IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri UDP – Low Overhead vs Reliability IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri UDP Datagram Reassembly IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri Applications that Use UDP IE1020|�Network�Fundamentals�|�Lecture�03|�Ms.�Pipuni�Wijesiri d n E � e h T 93 94 Network Fundamentals Lecture 04: Network Layer IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri Network Layer IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri Network Layer Features § Addressing� end� devices § Encapsulation § Routing IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri Network Layer Protocols IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri Internet Protocol (IP) Connectionless� Communication IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IP Cont. Best�Effort�Delivery IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IP cont. Media�Independence IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IP Packets IP�header�for�TCP� segments IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IPv4 Packet Header * * * * * IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IPv4 Packet Header Cont. IHL�(IP�Header�Length) • �Indicates�the�length�of�the�IP�header�by�number�of�4-byte� words�in�the�header�(Similar�to�HLEN�in�TCP�header) • If�the�header�is�20�bytes�(minimum�length�of�IP�header),� IHL�����=�20/�4 �����������=�5��(0100b) • If�the�header�the�60�bytes�(maximum�length�of�IP�header) IHL����=�60/�4 �����������=�15�(1111b) IP�Heade IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IPv4 Packet Header Cont. Type�of�service�(ToS)�field IP�Header IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IPv4 Packet Header Cont. Packet�Length • Indicates�the�total�length�of�the�IP�Packet • Total�Length�=�Header�Length�+�Data�Length • Maximum�Total�Length�is�65535�bytes • Maximum�Data�Length�? IP�Heade IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IPv4 Packet Header Cont. Fragmentation Transport�Layer 3000 Network�Layer 3000 F1 MTU F2 1480 Fragmentation F3 1480 40 (For�Ethernet�=�1500�bytes) Header (20�bytes) DataLink�Layer (Ethernet) IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IPv4 Packet Header Cont. Fragmentation Transport�Layer 3000 Network�Layer 3000 F1 F2 Fragmentation F3 MTU DataLink�Layer (Ethernet) DF Reserved MF • DF:�Do�not�Fragment • MF:�More�Fragments IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IPv4 Packet Header Cont. Fragmentation Transport�Layer 3000 Network�Layer 3000 Fragmentation F3 F1 F2 ID x x x DF 0 0 0 MF 1 1 0 MTU DataLink�Layer (Ethernet) FO IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IPv4 Packet Header Cont. Fragmentation Transport�Layer 3000 Network�Layer 3000 F1 1480 MTU DataLink�Layer (Ethernet) F2 0th / 8 FO 0 Fragmentation F3 40 1480 1479th 1480th 2959th 2960th2999 / / 8 8 th 185 270 IP�Heade IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri IPv4 Packet Header Cont. Time�To�Live�(TTL) • When�a�packet�of�information�is�created�and�sent�out�across�the�Internet,�there� is�a�risk�that�it�will�continue�to�pass�from�router�to�router�indefinitely�(looping).� • To�mitigate�loops,�packets�are�designed�with�an�expiration�called�a�time-to-live� or�hop�limit. TTL�=� 15 TTL�=� 16 TTL�=� 14 TTL�=� 15 TTL�=� 13 TTL�=� 14 TTL�=� 1 TTL�=� 2 TTL� =�0 TTL� =�1 DRO P IP�Heade IE1020|�Network�Fundamentals�|�Lecture�04|�Ms.�Pipuni�Wijesiri d n E � e h T 112 113 Network Fundamentals Lecture 05: Addressing IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Network Layer Address: IP Address • There�are�two�major�versions�of�IP�addresses IPv4 IP�Addresses IPv6 IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Network Layer Address: IP Address (Cont.) • IP�version�4�(IPv4)�address�is�32�bits�long�(i.e.�4�bytes) • IP�version�6�(IPv6)�address�is�128�bits�long�(i.e.�16�bytes) IPv4 IPv6 32-bit IP Address 128-bit IP Address 4.3 billion addresses Addresses must be reused and masked 7.9x1028 addresses Every device can have a Unique address Numeric dotted-decimal notation 192.168.5.18 Alphanumeric hexadecimal notation 50b2:6400:0000:0000:6c3a:b17d:0000:10a9 (Simplified -50b2:6400::6c3a:b17d:0:10a9) IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri IP Version 4 (IPv4) IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Classful Addressing • When IP addressing was first introduced, All IPv4 addresses were divided into 5 classes. Class Usage Class A General Purpose Class B General Purpose Class C General Purpose Class D Multicasting Class E Reserved for future use IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Finding the Class in Binary Notation IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Finding the Class in Decimal Notation IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Network ID (Net ID) and Host ID • Each IP address consist of two parts, Network ID Host ID Common in all the hosts within that organization Unique to each host IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Network ID (Net ID) and Host ID (Cont.) IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Masking Concept • Each� LAN� is� owned� by� a� particular� organization,� and� the� net� ID� is� what� differentiates�one�LAN�from�another�in�Internet�terms.� • �Finding�the�net�ID�is�extremely�important� since� net� ID� is� used� by� routers� to� route� the� packets� from� one� LAN� to� another�LAN�over�the�Internet� • When�we�look�at�a�classful�IP�address,�we�can�easily�say�to�which�class�that�IP� address�is�belonging�to�and�there�by�what�is�the�net�ID�of�that�IP�address. IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Masking Concept (Cont.) • Default�Masks IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Masking Concept (Cont.) • Although� we� humans� can� easily� interpret� the� net� ID� of� a� given� classful� IP� address,�how�does�a�router�calculate�the�net�ID? • For�this�we�use�the�concept�of�masking IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Special IPv4 Addresses IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Direct Broadcast Address (Broadcast Address) IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Loopback Address ü The most widely used loopback address is 127.0.0.1 IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri IPv4 – Exercise 1 For�following�addresses,�find�the� • Net�mask • Network�address • Broadcast�address • 1st�usable�host�ip�address • Last�usable�host�ip�address Ø Ø Ø Ø Ø 23.56.7.91 72.87.34.10 130.10.1.21 200.50.60.1 198.1.1.1 IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri IPv4 – Exercise 1 (Answer) 198.1.1.1�–�Class�C �������11000110�.�00000001�.�00000001�.�00000001 ���� �Net�ID ����������Host�ID Net�Mask������11111111�.�11111111�.�11111111�.�00000000��������� 255.255.255.0 ��������Net�ID:�All�‘1’s ���Host�ID:�All�‘0’s Network���������11000110�.�00000001�.�00000001�.�00000000�������� 198.1.1.0 Address IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri ��������Net�ID:�As�it�is ���Host�ID:�All�‘0’s IPv4 – Exercise 1 (Answer)(Cont.) Broadcast��������������11000110.�00000001.�00000001.� 11111111���������198.1.1.255 Address ��������Net�ID:�As�it�is ���Host�ID:�All�‘1’s 1st�Usable������11000110�.�00000001�.�00000001�.�00000001�������� 198.1.1.1 IP�Address ��������Net�ID:�As�it�is combination� (One�after�All�‘0’s) ���Host�ID:�Second� Last�Usable���11000110�.�00000001�.�00000001�.�11111110�������� IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Public addresses vs Private Addresses • Any�device�that�connects�directly�into�Internet�must�have�a�public�IP�address • A�private�IP�addresses�can�be�used�within�a�private�network • A� private� IP� address� is� mapped� to� a� public� IP� address,� when� the� machine� has� to� access�the�Internet IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri IPv4 Private Address Ranges • Following�ranges�are�reserved�to�be�used�in�Local�Area�Networks�for�private� addresses. .255 • Remember:� You� cannot� use� these� ranges� for� machines/interfaces� that� are� directly�connected�to�Internet. IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Network address translation (NAT) • NAT�(Network�Address�Translation)�Maps�Private�IPs�to� Public�IPs IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Network address translation (NAT) Cont. • Static�NAT�:�Maps�unique�Private�IP�to�a�unique�Public�IP� • Dynamic�NAT�:�Maps�Multiple�Private�IPs�to�a�Pool�of�Public�IPs� • Port�Address�Translation�(PAT)�:�Maps�a�Public�IP�and�a�Port�Number�to� a�service�in�Private�IP IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Problems with Classful Addressing • Class�A�and�B�are�too�large�for�typical�organizations�and�many�IP�addresses�will� not�be�used�and�wasted. • Class�C�is�not�enough�for�most�organizations�resulting�the�reservation�of�at�least� a�Class�B�address�range�for�the�organization. • The� end� result� is� that,� the� available� IP� addresses� are� depleting� at� an� alarming� rate�and�soon�there�will�be�no�more�IP�addresses. Solutions: • Short�Term:�Classless�Addressing�(FLSM/VLSM) • Long�Term:�IPv6 IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Classless Addressing (Subnets) • Suppose� you� are� given� a� network� address� 172.16.0.0� for� your� network. Class B 172.16.0.0 / 16 10010110.01100100.00000000.00000000 Net�ID • You� have� three� ������������Host�ID departments:� Finance,� Production� and� Administration.� • To� enhance� efficiency� of� network,� you� want� divide� network� into� three�networks. • But�you�cannot�get�another�two�network�addresses.� IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Classless Addressing (Subnets) Cont. • Now�the�IP�address�is�divided�into�three�parts. Net�ID�����Subnet�ID�����Host�ID • The�original�Net�ID�number�of�bits�is�not�changed. • Part�of��“Host�ID”�is�allocated�as�the�“Subnet�ID”. • In�the�above�example�172.16�(i.e.�first�16�bits)�are�not�changed.� 10101100.0001000.00000000.00000000 �������� �����������Net�ID • In�the�remaining�16�bits�the�most�significant�bits�are�allocated�as�Subnet� ID.� 10101100.00010000.00000000.00000000 ����������������Net�ID������������Subnet�ID�+�Host�ID IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Classless Addressing (Subnets) Cont. • Since� we� need� three� subnets� at� least� two� bits� are� required�for�Subnet�ID�(22�=�4) 00,�01,�10�and�11 IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Classless Addressing (Subnets) Cont. • Therefore�the�subnets�can�be�written�as Subnet�0 10101100.00010000.00000000.00000000 Subnet�1 10101100.00010000.01000000.00000000 Subnet�2 10101100.00010000.10000000.00000000 Subnet�3 10101100.00010000.11000000.00000000 • In�dotted�decimal,�it�can�be�written�as, Subnet�0�address 172.16.0.0��/18 Subnet�1�address 172.16.64.0��/18 Subnet�2�address 172.16.128.0��/18 Subnet�3�address 172.16.192.0��/18 IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Classless Addressing (Subnets) Cont. § For�the�above�example�the�Finance,�Production�and�Administration� Sections�can�be�put�to�three�subnets�as�follows. 172.16.0.0/ 18 • Consider� the� hosts� in� subnet� 172.16.64.0�� • The� IP� addresses� can� be� given� 172.16.64.0/ 18 as ü 172.16.64.1 ü 172.16.64.2 172.16.128.0/ 18 ü 172.16.64.3� ü 172.16.64.4�etc. IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Classless Addressing (Subnets) Cont. 172.16.64.0�/�18 �������10101100�.�00010000�.�01000000�.�00000000 �����Net�ID����������Subnet�ID �Host�ID Subnet����������11111111�.�11111111�.�11000000�.�00000000��������� 255.255.192.0 Mask �����������������Net�ID:�All�‘1’s����������Subnet�ID ‘0’s ������������All�‘1’s ����Host�ID:�All� Network�������10101100�.�00010000.�01000000�.�00000000��������� 172.16.64.0/�18 Address IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Classless Addressing (Subnets) cont. Broadcast�������10101100�.�00010000.�01111111�.�11111111��������� 172.16.127.255 Address �����������������Net�ID:�As�it�is����������Subnet�ID ‘1’s ������������As�it�is ����Host�ID:�All� 1st�Usable�������10101100�.�00010000.�01000000�.�00000001��������� 172.16.64.1/�18 Address �����������������Net�ID:�As�it�is����������Subnet�ID Second�combination� (One�after�All�‘0’s) ����Host�ID:� �As�it�is� Last�Usable����10101100�.�00010000.�01111111�.�11111110���� IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri IPv4 – Exercise 2 • If�one�of�the�addresses�in�a�subnet�is�196.88.10.12/28, • What�is�the�network�address? • What�is�the�broadcast�address? • What�is�the�first�host�address? • What�is�the�last�host�address? IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri IPv4 – Exercise 3 • If�one�of�the�addresses�is�190.87.140.202/29, • What�is�the�network�address? • What�is�the�broadcast�address? • What�is�the�first�host�address? • What�is�the�last�host�address? IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri IPv4 – Exercise 4 • What� is� the� first� host� address� in� the� block� if� one� of� the� addresses�is� ü 167.199.170.82/27 ü 140.120.84.24/20 • Find� the� number� of� host� addresses� in� the� block� if� one� of� the� addresses�is� ü 140.120.84.24/20 ü 140.120.84.24/20 IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Classless Addressing (Subnets) Cont. Subnetting�Based�on�Network�Requirements • The�number�of�subnet�addresses�required�for�each�network� • Consider�the�number�of�bits�for�subnet�ID. Subnetting�Based�on�Host�Requirements • The�number�of�host�addresses�required�for�each�network�(or� each�subnet) • Consider�the�number�of�bits�for�host�ID. IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Fixed Length Subnet Mask (FLSM) • Creates�all�subnets�with�the�same�size�(equal�number�of�hosts) Ex:�172.16.0.0�/18 172.16.64.0�/18 172.16.128.0�/18 214�–�2�hosts�in�each�subnet 172.16.192.0�/18 v Not�very�flexible. v Results�in�wasted�addresses.� IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Fixed Length Subnet Mask (FLSM) Cont. Problem ü Consider� a� traditional� Class� C� address� 192.168.1.0� and� an�organization�with�four�sections:� • the�call�center�with�50�hosts • the�data�center�with�75�hosts With�FLSM, • the�operations�floor�with�25�hosts • the�executive�floor�with�20�hosts 192.168.1.000000 00 26�–�2�hosts� 192.168.1.0��/26 (62) 192.168.1.64�/26�in�each� 192.168.1.128�/26 subnet 192.168.1.192�/26 IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Variable Length Subnet Mask (VLSM) Solution ü Variable�Length�Subnet�Mask�(VLSM) • Lets�begin�with�summarizing�requirements: Subnet Required�IPs Required� bits Reason Call�center 50 6 (26�–�2�>�50) Data�center 75 7 (27�–�2�>�75) Operations 25 5 (25�–�2�>�25) Executive 20 5 (25�–�2�>�20) IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Variable Length Subnet Mask (VLSM) Cont. • Next,�sort�the�table�according�to�the�Required�bits�(highest� to�lowest) Subnet Required�IPs Required� bits Reason Data�center 75 7 (27�–�2�>�75) Call�center 50 6 (26�–�2�>�50) Operations 25 5 (25�–�2�>�25) Executive 20 5 (25�–�2�>�20) IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Variable Length Subnet Mask (VLSM) Cont. • We�are�going�to�create�subnets�according�to�the�number�of� hosts�required� -�to�minimize�the�wasting�of�IP�addresses • The� process� starts� from� largest� number� of� hosts� required� and�continue�in�the�descending�order • Therefore,�we�start�with�the�requirement�of�Data�center�(75� hosts) IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Variable Length Subnet Mask (VLSM) Cont. • To� get� 75� IP� addresses� for� data� center,� we� allocate� 7� hosts� bits • We�have�1�subnet�bit � 192.168.1.00000000 192.168.1.10000000 192.168.1.0� /25 192.168.1.128� /25 27�–�2�hosts� (126) �in�each� subnet • One�of�the�newly�created�subnet�(first�subnet)�is�allocated�for� data�center IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Variable Length Subnet Mask (VLSM) Cont. • The� remaining� subnet� (192.168.1.128� /25)� is� used� for� further� subnetting • The�second�requirement�is�call�center�with�50�hosts • To�get�50�IP�addresses�for�call�center,�we�allocate��6�hosts�bits 6�–�2�hosts� • We� have� 1� more� subnet� bit� (all�192.168.1.128� together� we� 2have� 2� subnet� bits� now) �192.168.1.10000000 /26 192.168.1.192� /26 (62) �in�each� subnet �192.168.1.11000000 • One�of�the�newly�created�subnet�(first�subnet)�is�allocated�for�call� center IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Variable Length Subnet Mask (VLSM) Cont. • The� remaining� subnet� (192.168.1.192� /26)� is� used� for� further�subnetting • The�third�requirement�is�operations�with�25�hosts • To� get� 25� IP� addresses� for� call� center,� we� allocate� � 5� hosts� 192.168.1.192� 25�–�2�hosts� bits /27 (30) 192.168.1.224� �in�each� • We� have� 1� more� subnet� bit� (all�together� we� have� 3� subnet� /27 subnet bits�now) IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri �192.168.1.11000000 Variable Length Subnet Mask (VLSM) Cont. • The�newly�generated�subnets�can�be�allocated�as�follows:� operations�group:�192.168.1.192/27 executives�group:�192.168.1.224/27 • As�we�are�not�wasting�IP�addresses� and�further�subnetting�will�not�be�helpful,� we�can�stop�the�subnetting�process IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri Variable Length Subnet Mask (VLSM) Cont. ü The�data�center�with�75�hosts 192.168.1.0/25 ü The�call�center�with�50�hosts 192.168.1.128/26 ü The�operations�floor�with�25�hosts 192.168.1.192/27 ü The�executive�floor�with�20�hosts 192.168.1.224/27 IE1020|�Network�Fundamentals�|�Lecture�05|�Ms.�Pipuni�Wijesiri d n E � e h T 158 159 Network Fundamentals Lecture 06: IPv6 Addressing IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.� Limitations of IPv4 Scarcity�of�IPv4�Addresses • The�IPv4�addressing�system�uses�32-bit�address�space • 32-bit�address�space�allows�only�232�IPv4�addresses Configuration • IPv4�must�be�configured,�either�manually�or�through�the�DHCP • Limited�support�for�security Use�of�IPsec�is�optional • Limited�support�for�Quality�of�Service�(QoS) Use�of�ToS�bits�in�header IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv6 Huge�address�space § IPv6� addresses� are� 128� bits� long,� creating� an� address� space� with� 2128� poss addresses. Automatic�configuration� § IPv6�hosts�can�automatically�configure�IPv6�addresses,�even�in�the�absence�of�a�DH § Provide�support�for�security�with�IPsec� and�for�Quality�of�Service�(QoS)�with�prioritized�delivery IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv4 and IPv6 Coexistence The�migration�techniques�can�be�divided�into�three�categories:� ü Dual-stack ü Tunneling ü Translation IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri Dual-stack • Allows�IPv4� and� IPv6� to� coexist� on�the�same�network.� • Devices�run�both�IPv4�and�IPv6� protocol�stacks�simultaneously. IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri Tunneling • A�method�of�transporting� an�IPv6�packet�over�an� IPv4�network.� • The�IPv6�packet�is� encapsulated�inside�an� IPv4�packet. IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri Translation • The� Network� Address� Translation� 64� (NAT64)� allows� IPv6-enabled� devices� to� communicate�with�IPv4-enabled�devices�using�a�translation�technique • An�IPv6�packet�is�translated�to�an�IPv4�packet,�and�vice�versa. IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv6 Address Representation • 128� bits� in� length� and� written� as� a� string� of� hexadecimal� values • 4�bits�represents�a�single�hexadecimal�digit,� �128�bits�=�32�hexadecimal�digits •2001:0DB8:0000:1111:0000:0000:0000:0200 •FE80:0000:0000:0000:0123:4567:89AB:CDEF • Can�be�written�in�either�lowercase�or�uppercase� IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv6 Address Representation Cont. IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv6 Address Rules 1: Omitting Leading “0”s • The�first�rule�to�help�reduce�the�notation�of�IPv6�addresses�is� any� leading� 0s� (zeros)� in� any� 16-bit� section� (hextet)� can� be�omitted. • Ex: ü 01AB�can�be�represented�as�1AB. ü 09F0�can�be�represented�as�9F0. ü 0A00�can�be�represented�as�A00. ü 00AB�can�be�represented�as�AB. IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv6 Address Rules 2: Omitting All “0” Segments • A�double�colon�(::)�can�replace�any�single,�contiguous�string� of� one� or� more� 16-bit� segments� (hextets)� consisting� of� all�0’s. • Known�as�the�compressed�format. • Double� colon� (::)� can� only� be� used� once� within� an� address� otherwise�the�address�will�be�ambiguous. 2001:0DB8::ABCD::1234�(Incorrect�address) IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv6 Address Rules 2: Omitting All “0” Segments Cont. Example� #1 Example� #2 IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv6 Prefix Length • IPv6�does�not�use�the�dotted-decimal�subnet�mask�notation • Prefix� length� indicates� the� network� portion� of� an� IPv6� address�using�the�following�format:� • IPv6�address/prefix�length • Prefix�length�can�range�from�0�to�128 • Typical�prefix�length�is�/64 IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv6 Header Format § IPv4:� 20� Bytes� +�Options�� § IPv6:� 40� Bytes� +�Next�Header� (Extension� Header) IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv6 Header Format Cont. IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri IPv6 Extension Headers • Routing –�Extended�routing • Fragmentation –�Fragmentation�and�reassembly • Authentication –�Integrity�and�authentication�(security) • Encapsulation –�Confidentiality • Hop-by-Hop�Option –�Special�options�that�require�hop-by-hop�processing • Destination� Options –� Optional� information� to� be� examined� by� the� destination�node IE1020|�Network�Fundamentals�|�Lecture�06|�Ms.�Pipuni�Wijesiri d n E � e h T 176 177 Network Fundamentals Lecture 07: Routing IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Hosts Sending IP Packets A�host�can�send�a�packet�to: • Itself ü A�host�can�send�a�packet�to�itself,�by�using�the�loopback�interface�address • Local�host ü A�host�can�send�a�packet�to�another�host,�on�the�same�local�network ü The�hosts�share�the�same�network�address • Remote�host ü A�host�can�send�a�packet�to�another�host,�on�a�remote�network� ü The�hosts�do�not�share�the�same�network�address IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Forwarding Packets to a Remote Host • In� most� situations� we� want� our� devices� to� be� able� to� connect� beyond� the� local� network�segment • Devices�that�are�beyond�the�local�network�segment�are�known�as�remote�hosts • When�a�source�device�sends�a�packet�to�a�remote�destination�device,� then�the�help�of�routers�and�routing�is�needed� • Routing�is�the�process�of�identifying�the�best�path�to�a�destination� IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Default Gateway • The�router�connected�to�the�local�network�segment�is�referred�to�as�the�default� gateway. IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Default Gateway (Cont.) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Default Gateway (Cont.) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Default Gateway (Cont.) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing • When�a�packet�arrives�at�the�default�gateway�(router),� the�router�looks�at�its�routing�table�to�determine�where�to�forward� packets • Routing�table�is�constructed�by�considering�IP�addresses Therefore,�routers�work�in�Layer�3 IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing (Cont.) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing (Cont.) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing Table • The�routing�table�of�a�router�can�store�information�about: • Directly�connected�networks • Remotely�connected�networks ü Static�routing ü Special�case:�default�route ü Dynamic�routing IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing Table (Cont.) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing Table (Cont.) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing Table (Cont.) Directly�connected�networks • Directly�connected�networks�are�directly�attached�to�one�of� the�router�interfaces� • Router�learns�about�directly�connected�networks� automatically IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing Table (Cont.) Directly�connected�networks� Cont. IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing Table (Cont.) Remotely�connected� networks�Cont. • These�are�networks�connected�to�other�routers�(remote� networks) • Routes�to�these�networks�can�be� • statically�configured�or� • dynamically�learned�through�dynamic�routing�protocols. IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing to Remotely Connected Networks • Remote�networks�are�added�to�the�routing�table� ü Static�routing�(configuring�routes�manually) ü Dynamic�routing�(using�routing�protocols) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Static Routing • A�static�route�includes� ü the�network�address�and�subnet�mask�of�the�remote�network,� ü along�with�the�IP�address�of�the�next-hop�router�or�exit�interface.� IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Static Routing (Cont.) Static�routes�should�be�used�when: • A�network�with�few�routers • A�network�is�connected�to�the�Internet�only�through�a�single�ISP �Static�Routing�Advantages • Minimal�CPU�processing� • Easier�for�administrator�to�understand Static�Routing�Disadvantages • Configuration�is�time-consuming�and�error-prone • Does�not�scale�well�with�growing�networks IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Dynamic Routing Use�of�routing�protocols IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Dynamic Routing (Cont.) • Routing�tables�are�updated�automatically�using�routing�rules�(�protocols�) • Routing�tables�have ü Initially:�‘connected’�records�for�directly�connected�networks ü Next:�add�‘static’�records�for�remote�networks ü Finally:�add�dynamic�updates�for�remote�networks�(use�of�routing�protocols) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing Protocols • Routing�Protocols�allow�routers�to� ü dynamically�advertise�and�learn�routes ü determine�which�routes�are�available ü determine�which�are�the�most�efficient�routes�to�a�destination IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing Protocols (Cont.) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing Protocols (Cont.) • An� autonomous� system� (AS)� is� a� collection� of� routers� under� a� common� administration ex�:��a�company's�internal�network • Interior� Gateway� Protocols� (IGP)� are� used� for� intra-autonomous� system� routing� (routing�inside�an�autonomous�system) • Exterior� Gateway� Protocols� (EGP)� are� used� for� inter-autonomous� system� routing� (routing�between�autonomous�systems) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Routing Protocols (Cont.) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Interior Gateway Protocols (IGP) IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Distance Vector Routing Protocols • Routes�are�advertised�as�vectors�of�distance�and�direction • Distance�is�defined�in�terms�of�a�metric�such�as�hop�count�and� direction�is�simply�the�next-hop�router�or�exit�interface • Send�periodic�updates�of�their�routing�information • Use�the�Bellman-Ford�algorithm�for�best�path�selection • Work�best�in�situations�where: -�Network�is�simple -�Administrators�do�not�have�enough�knowledge�to�configure Ex�:�RIP,�IGRP,�EIGRP� IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� RIP - Routing Information Protocol • A�simple�interior�gateway�routing�protocol • Straightforward�implementation�of�Distance�Vector�Routing • Each�router�advertises�its�distance�vector�every�30�seconds� (or�whenever�its�routing�table�changes)�to�all�of�its�neighbors • Maximum�hop�count�is�15,�with�“16”�equal�to�“” • Routes�are�timeout�(set�to�16)�after�3�minutes�if�they�are�not�updated IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Link State Routing Protocols • Send� information� about� the� state� of� its� links� to� other� routers� in� the� routing� domain • State�of�those�links�include� ü information�about�the�type�of�network�and� ü any�neighboring�routers�on�those�networks • A�link-state�update�only�sent�when�there�is�a�change�in�the�topology • Use�the�Dijkstra�algorithm�for�best�path�selection • Work�best�in�situations�where: -�Network�is�complex�(large�networks) Ex�:�OSPF,�IS-IS IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Metrics and Routing Protocols RIP ü��Hop�count�(best�path�is�chosen�by�the�route�with�the�lowest�hop�count) IGRP�and�EIGRP ü Bandwidth,�Delay,�Reliability,�and�Load ü Best� path� is� chosen� by� the� route� with� the� smallest� composite� metric� value� calculated�from�these�multiple�parameters� ü By�default,�only�bandwidth�and�delay�are�used� IS-IS�and�OSPF ü Cost�(best�path�is�chosen�by�the�route�with�the�lowest�cost) ü �Cisco's�implementation�of�OSPF�uses�bandwidth�cost� IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� Dynamic Routing Advantages/Disadvantages Advantages: • Administrator�has�less�work�maintaining�the�configuration • Protocols�automatically�react�to�the�topology�changes • Configuration�is�less�error-prone • More�scalable Disadvantages: • Router�resources�are�used�(CPU�cycles,�memory�and�link�bandwidth) • More� administrator� knowledge� is� required� for� configuration,� verification,� and� troubleshooting IE1020|�Network�Fundamentals�|�Lecture�07|�Ms.� d n E � e h T 209 210 Network Fundamentals Lecture 08: Data Link Layer IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer (Cont.) IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer (Cont.) • Supports�the�communication�processes�over�different�medium • At�each�hop�along�the�path,�an�intermediary�device�-�usually�a�router�–� ü accepts�frames�from�a�medium,� ü decapsulates�the�frame,� ü and� then� forwards� the� packet� in� a� new� frame� appropriate� to� the� medium� of� that�segment�of�the�physical�network.� IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer (Cont.) IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Sub-layers IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Sub-Layers (Cont.) IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control Collision s Overhea d IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control (Cont.) • The�actual�media�access�control�method�used�depends�on� ü how�the�media�is�shared ü topology IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control (Cont.) Methods:�Shared�media ü Controlled�access ü Contention-based�access IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control (Cont.) Shared�media:�controlled�access • Network� devices� take� turns,� in� sequence,� to� access� the� medium • Each�device�has�its�own�time�to�use�the�medium IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control (Cont.) Shared�media:�Contention-based�access� • Allow�any�device�to�try�to�access�the�medium�whenever�it�has�data�to�send. • To�prevent�collision,�device�needs�to� first�detect�if�the�media�is�already�carrying�a� signal. (Ex:�Use�CSMA/CD�or�CSMA/CA) IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control (Cont.) Carrier�Sense�Multiple�Access/Collision�Detection� (CSMA/CD) • The�device�monitors�the�media�for�the�presence�of�a�data�signal� ü If�a�data�signal�is�absent,�indicating�that�the�media�is�free, then�the�device�transmits�the�data ü If�a�data�signal�is�present,�indicating�that�another�device�was�transmitting�at� the�same�time, the�device�stop�sending�and�try�again�later • Ethernet�uses�this�method IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control (Cont.) Carrier�Sense�Multiple�Access/Collision�avoidance� (CSMA/CA) • The�device�examines�the�media�for�the�presence�of�a�data�signal ü If�the�media�is�free,� the�device�sends�a�notification�across�the�media�of�its�intent�to�use�it� ü Then�the�device�then�sends�the�data • IEEE�802.11�wireless�networking�technologies�use�this�method IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control (Cont.) IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control (Cont.) Non�Shared�media Half� Duplex IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control (Cont.) Non�Shared�media Full� Duplex IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Media Access Control (Cont.) Topologies Controlled�access:�Token� Passing Contention�base� access IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer Address: MAC Address IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer Address: MAC Address (Cont.) IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer Standards IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer Protocols IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer Frame: General IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer Frame: LANs • Family� of� networking� technologies� that� are� defined� in� the� IEEE� 802.2� and� 802.3�standards IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Ethernet Using Hubs IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Ethernet Using Switches IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Ethernet Using Switches (Cont.) IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Switch MAC Address Learning Process IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Switch Frame Forwarding Methods • Store-And-Forward� • Cut-Through� • Fast-forward�switching ü Lowest�level�of�latency� ü Immediately�forwards�a�packet�after�reading�the�destination�address • Fragment-free�switching ü Switch�stores�the�first�64�bytes�of�the�frame�before�forwarding ü Most�network�errors�and�collisions�occur�during�the�first�64�bytes IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Switch Port Settings IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Address Resolution Protocol (ARP) 192.168.10.2 PC A to PC B IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Address Resolution Protocol (ARP) 192.168.10.2 IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� ARP Cache IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� ARP Issues Broadcasting IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� ARP Issues (Cont.) ARP�spoofing IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Data Link Layer Frame: WANs IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� d n E � e h T 247 248 Network Fundamentals Lecture 08: Physical Layer IE1020|�Network�Fundamentals�|�Lecture�08|�Ms.� Physical Layer IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. • The�physical�layer�encodes�the�frames�and� creates� the� signals� (electrical� /� optical� /� radio)� that� represent� the� bits�in�each�frame • These�signals�are�then�sent�on�the�media,�one�at�a�time IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. Standards IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Physical Layer Cont. Standards�cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Signals IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Encoding and Modulation • Two�techniques�used�to�map�information�or�data�into�different�formats� and�send�through�the�transmission�media • Encoding� is� the� process� of� preparing� information� (data)� for� efficient� and�accurate�transmission� data�->�signals • Modulation� is� the� process� of� combining� information� (signals)� with� an� electronic�or�optical�carrier,�so�that�it�can�be�transmitted�to�distance� signals�+�carrier IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Encoding • When�data�is�transmitted,�it�must�be�mapped�to�a�signal�pattern�� • The� signal� pattern� should� make� transmission� as� efficient� and� as� reliable� as� possible • • • • Computing Digital�data�->�Digital�signal Digital�data�->�Analog�signal Analog�data�->�Analog�signal Analog�data�->�Digital�signal IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Encoding Cont. Line� Coding • Unipolar:�Uses�only�one�voltage�level • Polar:�Uses�two�voltage�levels�(positive�and�negative) • Bi-polar:�Uses�three�voltage�levels�(positive,�negative,�and�zero) IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Encoding Cont. Unipolar Non-Return�to�Zero� (NRZ)� IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Encoding Cont. Polar IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Encoding Cont. Polar� Cont. • NRZ-L:�Level�of�the�signal�depends�on�the�state�of�the�bit� (1�or�0) • NRZ-I:�If�a�“1”�is�encountered,�then�the�signal�is�inverted IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Encoding Cont. Polar� Cont. • RZ:�Signal�goes�to�0�in�the�middle�of�each�bit IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Encoding Cont. Polar� Cont. Manchester • �A�transition�for�every�bit�in�the�middle�of�the�bit�interval • �(+)�to�(-)�represent�a�“0”,�(-)�to�(+)�represent�a�“1”� IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Encoding Cont. Polar� Cont. Differential�Manchester • Transition�for�every�bit�in�the�middle�of�the�bit�interval • Transition�at�the�beginning�of�the�bit�cell�if�the�next�bit�is� "0“ • NO� Transition� at� the� beginning� of� the� bit� cell� if� the� next� bit�is�"1�"� IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Encoding Cont. Bi-Polar Alternate�Mark�Inversion�(AMI) • Zero�voltage�represents�“0”� • “1”s�are�represented�by�alternating�positive�and�negative� voltages IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Modulation • A� technique� in� which� information� signal� is� transmitted� to� the� receiver� with�the�help�of�carrier�signal ü We�combine�both�carrier�signal�and�information�signal� ü The�carrier�wave�is�altered�in�a�way�that�it�is�able�to�carry�information� on�it • Analog� Modulation:� the� input� information� signal� is� in� the� analog� format • Digital�Modulation:�the�input�information�signal�is�in�the�digital�format • However,�in�both�scenarios IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� • The�carrier�signal�is�an�analog�signal Modulation Cont. Input�Signal (Information� Signal) Analog�/�Digital MODULATION Output�Signal (Modulated� Signal) Analog Carrier�Signal Analog IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Modulation Cont. Analog�Modulation IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Modulation Cont. Analog�Modulation IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Modulation Cont. Analog�Modulation IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Modulation Cont. Digital� Modulation IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Modulation Cont. Analog�signal�to�Digital�signal�modulation:� Pulse�Code�Modulation�(PCM) IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Modulation Cont. Analog�signal�to�Digital�signal�modulation:� Pulse�Code�Modulation�(PCM) Encoding • 8�bits/�16�bits/�32�bits� etc. Ex: 8�bits�=�28� combinations ����������=�256� ����������=�0�to�255� (levels) IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Data Transfer Rates • Different� physical� media� support� the� transfer� of� bits� at� different�rates • Data�transfer�->�bandwidth�and�throughput • Bandwidth�is�the�capacity�of�a�medium�to�carry�data • A� combination� of� factors� determines� the� practical� bandwidth� of�a�network: ü The�properties�of�the�physical�media ü The�technologies�chosen�for�signaling�and�detecting�network�signals IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Data Transfer Rates Cont. • Throughput� is� the� measure� of� the� transfer� of� bits� across� the� media�over�a�given�period�of�time • Throughput� usually� does� not� match� the� specified� bandwidth� in� physical�layer�implementations • Many�factors�influence�throughput,�including: ü The�amount�of�traffic ü The�type�of�traffic ü The�latency�created�by�intermediate�network�devices IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Bandwidth IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Throughput IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Multiplexing • Whenever� the� bandwidth�of�a�medium�linking�two�devices� is� greater�than�the�bandwidth�needs�of�the�devices,�the�link�can� be�shared.� • Multiplexing� is� the� set� of� techniques� that� allows� the� (simultaneous)� transmission� of� multiple� signals� across� a� single�data�link. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Multiplexing Cont. IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Frequency Division Multiplexing (FDM) IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Wavelength Division Multiplexing (WDM) IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Time Division Multiplexing (TDM) IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Types of Physical Media Wireless Copper�Cables IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� Transmission Media Impairments • Attenuation�–loss�of�energy • Distortion�–change�in�the�shape�of�signal • Noise�–random�or�unwanted�signal�that�mixes�up�with�the�original�signal� IE1020|�Network�Fundamentals�|�Lecture�09|�Ms.� d n E � e h T 293 294