Created by: Ahmed Nabil Organized by: Abdullah Ahmed IP network • It is a group of components that are connected together to provide a service or application, consists of: 1. End device: It’s the main components because it is the source of network application. Ex: computer, camera, phone, pc, etc. 2. Intermediate devices: modem, hub, switch, bridge, router, wireless access point, firewall, IDS(Intrusion Detection System), IPS(Intrusion Prevention System). 3. Connectivity: wired, wireless. Created by: Ahmed Nabil Organized by: Abdullah Ahmed What is CISCO? • It is a network appliance vendor • Ex: Routers, switches, wireless access point, firewall. • Cisco co-founders: Leonard & Sandy • CCNA Cisco Certified Network Associate • 150 certificates offered from cisco • 60 billion dollar per year • 70,000 employers at Cisco • R&D staff for Huawei 76,000 employers Created by: Ahmed Nabil Organized by: Abdullah Ahmed IP network function 1. Easy sharing of data, information, & files. 2. Easy sharing of experience resources. Ex:(Instead of a printer for everyone, the IP network will connect all employees on one printer) 4. Video convert images into 101010011 5. Perfume send perfume through network 6. Taste Molokhya taste send to brain in terms of electric signals, Instead of the man’s tongue, a silver rod immersed in the food and have the ionization as the tongue. 7. Touch. Created by: Ahmed Nabil Organized by: Abdullah Ahmed st 1 Ranked Companies • 1st router Juniper • 1st switch Cisco • 1st wireless ARUBA • 1st VOIP AVAYA • 1st security Palo Alto • 1st cloud DELL-EMC Created by: Ahmed Nabil Organized by: Abdullah Ahmed End devices Protocols • HTTP (Hyper Text Transfer Protocol): used for browsing • HTTP Request: please I need copy from my Facebook page. • HTTP Response: Here is your copy. • Server is computer with high specs (memory & hardware), to help the others. Created by: Ahmed Nabil Organized by: Abdullah Ahmed FTP (File Transfer Protocol) • Used for upload & download for huge files • FTP server like: 4shared & rapid share. Created by: Ahmed Nabil SMTP (Simple Mail Transfer Protocol) POP3 (Post Office Protocol Version 3) • SMTP: from person to post office (mail server) • POP3: From post office (mail server) to the target person Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Telnet (Teletype network) • Used for remote login & configuration • Ex: OBS (Orange Business Service), their business model put routers & switches in all Paris and they offer a private network and TELNET services. (Largest private network in world) • OBS, VIS (Vodafone International Services), NCR, TE-enterprise dealing with Enterprises. • Dell-EMC Cloud services IP network Topologies Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Ring Topology: the message will loop, until the destination PC opens • Mesh Topology has large number of cards = (n(n-1))/2, n: no. of devices • The concept of intermediate devices, comes from Star topology Created by: Ahmed Nabil Physical vs. Logical • HUB Physical: star topology • Switch Physical: star topology Organized by: Abdullah Ahmed Logical: Bus topology Logical : Mesh topology Types of IP network Created by: Ahmed Nabil Organized by: Abdullah Ahmed • In network they use baseband not passband, as there is no modulation. • LAN: it’s a group of components that are connected together within local area ( تحت السيطرة, )ملكية خاصةlike: AUC & City stars mall. • MAN: it’s a group of LANs in same city. (contain ISP/SP(service provider)) • WAN: it’s a group of LANs between cities, countries, & continents. (contain ISP/SP) • SP Private Network • ISP Public Network Created by: Ahmed Nabil Ethernet Technology Organized by: Abdullah Ahmed • Ethernet: Ether it’s a gas evaporate rapidly, net network • Ethernet card NIC (Network Interface Card), LIC (LAN Interface Card) • Fast Ethernet 100Mb/s • Giga Ethernet 1000Mb/s • Ten giga ethernet 10Gb/s • Hundred giga ethernet 100Gb/s used by: Facebook, google servers • Tera ethernet 1000Gb/s • Max distance 100m ethernet card or wireless card WAN cards Created by: Ahmed Nabil Organized by: Abdullah Ahmed These cards used by the enterprises: • DSL )Digital subscriber line( card: max. distance 7.5km • X.25 • Frame Relay 15km • ATM Asynchronous Transfer Mode • PPP • HDLC (High data Link Control) • MPLS (Multiprotocol label switching) 15,000km – 40Gb/s Note: TAT-14 (Trans Atlantic Telecom cable no.14) 15,000km – 40Gb/s Created by: Ahmed Nabil Organized by: Abdullah Ahmed Network Model • It is a group of concepts that will tell the device, how to send data hopto-hop (step-to-step), & then end-to-end. (The tongue of network to talk to another network) • Operating system (OS): software of end devices. windows, Unix, Linux, macOS, iOS, Android • Internetwork Operating System (IOS): the software of the intermediate devices. (cisco help apple in their operating system so why its called iOS) • Operating system تبث الحياة فىhardware. OSI model Created by: Ahmed Nabil Organized by: Abdullah Ahmed • OSI (Open System Interconnection) by IOS (International Organization of Standardization) • open standard ( & )قابل للتعديلopen source .)(غير محتكر • DOD (Department of defense) invented (TCP/IP) model. IPV4,IPV6, IPV9 • The layer: It’s a function done by using S/W or H/W. • Functions are sequential • From L3 L7 are inside the computer • NIC is consist of 2 parts: 1st part L2 (Data link) and 2nd part is L1 (physical) Created by: Ahmed Nabil Organized by: Abdullah Ahmed L7: Application layerتجهيز • It is responsible for making the proper data preparation for the proper service. TCP/IP OSI • HTTP Browsing • FTP File download/upload • SMTP/POP3 send retrieve e-mail • TELNET remote login • RTP (Real-Time Transport Protocol) no RTP in OSI • video, voice, & games live Created by: Ahmed Nabil Organized by: Abdullah Ahmed L6: Presentation Layer تكويد • It is responsible for sending common data representation between sender & receiver • Coding the data to let the user device know which types of data is it, for example: video, image, etc. • Ex: image.jpg, GIF, pdf coded • Ex: Voice.mp3,mp4 coded L5: Session layer تتميم Created by: Ahmed Nabil Organized by: Abdullah Ahmed • It is responsible for making sure & check that all information required for session opening become ready, & in that case it will give orders for: Session Establishment انشاء Session layer Session Management & control معالجة المشاكل Transport layer Session termination انهاء Ex: Amr@gmail.com Amr folder mail box Gmail.com mail server Session layer check that you wrote in the subject, body and the email name is all right and you can start, after that the transport layer will be responsible for actual mechanics ((التنفيذ Created by: Ahmed Nabil Protocol data Unit (PDU) • Segment: • Packet: Frame: Organized by: Abdullah Ahmed Sequence 1, session 1, & CRC Data part Sequence 2, session1, & CRC Data part Source IP and destination IP Source MAC – Destination MAC Segment Packet • TCP header = 20-byte, segment size=1480-byte • IP header = 20-byte, packet size=1500-byte • ETH-header = 14-byte, ETH-Tail=4-byte, & frame size=1518-byte • Between frame and another frame, there is an Idle time equal to 64-bit. CRC L4: Transport Layer)(تقطيع ترقيم تصوير Created by: Ahmed Nabil Organized by: Abdullah Ahmed Its function: Session Management & control: Segmentation تقطيع Sequencing & addressing ترقيم Error detection using CRC (Cyclic Redundancy Check)تصوير • TCP & UDP divide the data to the maximum size, which is 1460-byte, and the rest will be less than 1460-byte, but its okay it can be sent. Protocols: • TCP: Transmission Control Protocol • UDP: User Data Protocol L4: Transport Layer)(تقطيع ترقيم تصوير Created by: Ahmed Nabil Organized by: Abdullah Ahmed • It segments or divides the data into parts to overcome the error when it effects the data, so affecting a part of data better than all the data. • Transport layer responsible for segmentation, sequencing, & error detection. • Segment size=1480 Bytes • The segment has a session (file) number, & the session (file) divided into sequence numbers. • CRC is a small copy of the data, that compare the CRC of the sending data with CRC of the receiving data. • If there is a difference so there is an error. Created by: Ahmed Nabil Network Layer & Data link layer • IP is the final end address Packet (H + H + data part) • Frame (H + H + H + data part + T) next hop • Card and cable hop to hop transmission and control • MAC address hop to hop address • Every device has a mac address in its ROM SRC IP:1.1.1.1 Seq# Data part • Frame SRC MAC:A DST MAC: B DST IP:2.2.2.2 Sess# CRC SRC MAC: C DST MAC: D SAME SAME Data part Organized by: Abdullah Ahmed CRC CRC • Travelling from hop to hop make change only in MAC addresses and CRC, but the IP addresses don’t change because it is end to end, and also the data part won’t change. Created by: Ahmed Nabil HUB Organized by: Abdullah Ahmed Its used as a centralized device to provide physical star topology. It floods bits. Its layer 1 device. Act as a wire It doesn’t understand final end or IP address, & next hop or MAC address It was used in LAN, as it can’t be used in WAN, because its not reasonable to floods data on ports of the WAN network. Created by: Ahmed Nabil Switch Organized by: Abdullah Ahmed It’s a centralized device to provide physical star topology. It doesn’t know final end, but it understands next hop. It is layer 2 (network Access layer) (MAC – Frame – Layer 2) Switch ports supported by H/W LAN switch(NIC - LIC - Ethernet Card) distance 100m WAN switch (WIC – Serial – DSL – X.25 – ATM – FR – HDLC MPLS ) cards. Switch deal only between networks with same communication technology Router Created by: Ahmed Nabil Organized by: Abdullah Ahmed Mixed technology (Technology converter). (From LIC to WIC) Understands final end & next hop. Understand IP & MAC address Router in central ( )السنترالwill be: WIC Router WIC Router in company will be: NIC Router WIC Home Router contain wireless access point, switch & digital modem Created by: Ahmed Nabil Digital Modem • CSU (Channel Service Unit), DSU (Data Service Unit). • It is used to provide clocking and synchronization ()ضبط السرعة. • As the LAN is a high speed than WAN, so you need a device to synchronize between them. Organized by: Abdullah Ahmed Examples for network Connections Created by: Ahmed Nabil Organized by: Abdullah Ahmed • If there are a two networks, & need to be connected, so use point-to-point connection (wire), but in real they put a switch in between to know what is the data that have been sent. (Security purposes) • If there are more than network with same technologies, so use a switch. • If there are more than network with different technologies, so use a router. • Using different communication technologies in the same network, decrease the speed of it. Why? • Because these conversion of technology done by router, which S/W-baseddevice which will take time to process, in contrast with the switch, which is H/W-based-device that is very fast. • SP Private Network • ISP Public Network Created by: Ahmed Nabil Classification of network Components Organized by: Abdullah Ahmed • DTE (Data Terminal Equipment): It’s a device that can either be source or destination for data & information. Ex: End devices & Router • DTE is at least layer 3 or more • DCE (Data Communication Equipment): Its is a device that can either be: (providing physical star topology – Providing clocking & synchronization). Ex: HUB, Switch, Digital modem (CSU/DSU), & wireless access point. • DCE is at most layer 2 or less. Created by: Ahmed Nabil Physical Layer Organized by: Abdullah Ahmed • LAN (Cable – card standard – Connections – Layer 1 devices) • LAN Cables Ethernet Cables: orange & white orange TX Green & white green RX (Blue & white blue) & (Brown & white brown) used in two cases: o Giga-Ethernet (1Gb/s – 10Gb/s) o POE (Power over ethernet): (Blue & white blue) & (Brown & white brown) act as positive potential & negative potential respectively. (Blue & white blue) & (Brown & white brown) spare in one case: o (10Mb/s – 100Mb/s) Ethernet • Power cable emits EMF (Electromagnetic field), which effects the data cable, recommended to let a distance between them 30cm for UTP (shielded Twisted Pair ) , and 5cm for STP (shielded Twisted Pair ). Created by: Ahmed Nabil Organized by: Abdullah Ahmed Twisted Pair Categories • Cat 3 up to 8Mb/s, not used now, was installed from your home to central • Cat 5 up to 100Mb/s, enable to fast ethernet • Cat 5e1Gb/s • Cat 6 4 Gb/s • Cat 6A/Cat 6E10 Gb/s • Cat 740Gb/s • Connecting those cables to LAN cards enable to 100m • Connecting those cables to WAN cards enable to 15 km and beyond Created by: Ahmed Nabil Fiber Cables Organized by: Abdullah Ahmed • Fiber cable consists of: (outer jacket – cladding – core –member strength (protect from temperature)) • High light 1, Low light0 • Max. distance 100Km with 100Gb/s guaranteed 25 years • Max. distance 100Km with 15Tb/s guaranteed 5 seconds & then the card is damaged • Fiber cable has high immunity to electromagnetic interference • Fiber Categories: MMF 62.5/125 core = 62.5 µm, cladding = 125µm, dist.=400m, speed=100Gb/s MMF 50/125 core = 50 µm, cladding = 125µm, Dist.= 2-4km, speed=100Gp/s SMF 9/125 core = 9 µm, cladding = 125µm, Dist.= 10km, speed=100Gp/s SMF 8/125 core = 8 µm, cladding = 125µm, Dist.= 100km, speed=100Gp/s Created by: Ahmed Nabil LAN Cards: Ethernet Cards (NIC=LIC) types: Organized by: Abdullah Ahmed • Card consists of: (Data link layer – Physical Layer) • 100m Cards (Ethernet Copper) Types: 10 Base T Cat 5 , Base baseband no modulation 100 Base T Cat5 , T Twisted pair 1000 Base T Cat5e 10G Base T Cat6A/6E • Ethernet Fiber: 1000 Base (SX – LX – ZX) SX = 400m-4km, MMF=62.5/125-50/125 10G Base (SX – LX – ZX) LX = 10km , SMF = 9/125 100G Base (SX – LX – ZX) ZX= 100km, SMF =8/125 Recommended to use a card has twice the data rate that will be sent every day Connectors Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Fiber: [SC (Square connector) cisco] – [ST (Straight Tip) juniper] • Take care when looking at one end of fiber, it effects the eye, where the light is invisible. • Copper Connectors DB (D-shaped) DB-60, DB-21, DB-15, &DB-9. RJ (Registered Jack): RJ11WAN, & RJ45LAN TX1,2 pins – RX3,6 pins, better in performance than 3,4 where to overcome the losses between RJ45 & port of the device (capacitance & inductance) Connectors RJ45 color coding • T568-B [pin(1,2)orange, pin(3,6)green] • T568-B [pin(1,2)green, pin(3,6)orange] • LAN DTE (TX pin(1,2)-RX pin(3,6))End device, Router • LAN DCE (RX pin(1,2)-TX pin(3,6))Switch, HUB Created by: Ahmed Nabil Organized by: Abdullah Ahmed Connection Types 1. Straight Cables: Ex: Between DCE & DTE 1. Crossover Cables Ex: Between DCE & DCE, DTE & DTE 1. Rollover cables Ex: connect it to the console port of router or switch to program or configure it Created by: Ahmed Nabil Organized by: Abdullah Ahmed Connection Types Created by: Ahmed Nabil Organized by: Abdullah Ahmed Special Cases Connects home router with the PC, the devices are DTEs and connects with straight, so How? • Inside the home router a switch ports which can connects to PC through straight cable. • PC can connect with another PC with straight cable, because inside each pc there is a MDIX (Media Dependent Interface cross), which act as transceiver, switch RX to TX or TX to RX. • MDIX not used for data with critical high speed, because every 30 seconds, making a check that RX talk to TX and vice verse • This checking affects the quality of data transmission. Layer 1 devices Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Repeater: It re-generate the signal. • HUB: It is multiport repeater, floods the data out to all ports, except the receiving port. Created by: Ahmed Nabil Data Link layer Organized by: Abdullah Ahmed • Data link layer (MAC address – MAC frame – Layer 2 devices) • It is responsible for hop to hop data delivery. • Mobile has no MAC address, the 4G card has the MAC address • PC has no MAC address, the NIC card has the MAC address • Switch has no MAC address ()استخسروا فيه • DTE has MAC address • DCE hasn’t MAC address MAC Address Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Travelling through LAN needs MAC, but travelling through WAN needs IP. • MAC Address (Physical address – HW address - hop to hop address) • It is used to send data to next hop. • It is 48-bit address, burnt on ROM. • It is represented in hexadecimal. • The OUI (Organization Unique Identifier)vendor part • OUI enable to know the vendor name. • One OUI costs 16 million-dollar, cisco bought 250 OUI • The 2nd half of MAC is the host part. Created by: Ahmed Nabil Next Hop Types (Destination MAC Types) Organized by: Abdullah Ahmed • Unicast MAC one send and only one process If data sent to C (MAC address)and there are A,B, &D, only C will accept the data, by comparing the MAC address in its ROM with MAC address from the sender, then open and see inside it. • Broadcast MAC One send all process Each device has two MAC address: 1. Unique MAC address, 2. Broadcast address (FFFFFFFFFFFF) Created by: Ahmed Nabil Next Hop Types (Destination MAC Types) Organized by: Abdullah Ahmed • Multicast MAC One send and group process Multicast MAC 01005exxxxxx(1st 6*hexa=fixed, 2nd 6*hexa=variable) One Multicast MAC address =10$ Programmer do a program, that enable the PC when installed in it, to have a MAC address saved in its RAM, to be able to send and receive the data inside the multicast network. The company after using the Multicast MAC address. It return again to IEEE, & IEEE re-assigned it to another customer. MAC Frame Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Min. packet size 46-byte • Max. packet size 1500-byte MTU(Maximum Transfer Unit) • Less than 46-byte will not sent, so the IP header can be extended from 2060-byte • Min. frame size (14+46+4)=64-byte • Max. frame size (14+1500+4)=1518-byte • Preamble bytes, know the speed of data, so you can set the auto-clocking & synchronization. • Destination & source address MAC address • Type IPV4, IPV6, IPX (made by IBM), Apple (made by Apple) • Data Packet • FCS Frame Check Sequence (CRC) Created by: Ahmed Nabil Layer 2 Devices Organized by: Abdullah Ahmed • It understand MAC address and MAC frame. Bridge switch It operates by S/W Its multiport bridge operates by H/W ASIC (Application Specific Integrated Circuit) Slow because based on S/W Fast because based on H/W Max. ports = 16 It contain: Learning ASIC, Forwarding ASIC, Security ASIC, & QOS (Quality Of Service) ASIC highest priority for voice & video • The speed of switch is called wire speed. (H/W ) العتمادها على • Cisco Catalyst 6513 576 ports max speed 1.4Tb/s • Juniper EX 8208 768 ports max speed 12Tb/s • Cisco Nexus 95004196 ports max speed60Tb/s LAN Switch Functions Created by: Ahmed Nabil Organized by: Abdullah Ahmed • (Learning – Forwarding - Remove Layer 2 loops) • Learning: It is forming MAC address table by checking the source MAC in frames. • If the received devices don’t reply, the switch won’t be able to know them. • Switch will flush or remove the inactive switch after 5 minutes of inactivity by default. • Core Switch: A switch that the other switches connected to it. • Switch has no MAC address, but it understand MAC and know how to deal with it. LAN Switch Functions Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Switch can learn many devices on same port. • It called switch, because it opens the wire and closes the wire. • Flushing the inactive devices after 5 minutes, increases the speed of searching about the mac address in specific port, & let the RAM empty as much as can. • Switch can never learn same device on two different ports. LAN Switch Functions Created by: Ahmed Nabil Organized by: Abdullah Ahmed Forwarding: لحد ما يجى ردflood هيعمل, لو مش عارف مش بيتخضswitch ال Switching frames to next hop (next DTE not DCE, because switches don’t see the other switches, as it don’t have MAC addresses), by checking the destination MAC in frames. • The ideal case, that the switch know where is the destination device. • The real case, that the switch doesn’t know where is the destination (DST) device, so it floods to all ports until the DST device reply, then it know which port is connected to the DST device. • After 5 minutes from inactivity of the device, the switch flush the data of its DST MAC from its RAM. LAN Switch Functions Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Q:If there are four ports at the switch, three ports are known its DST devices, except one port, How the Switch can deal with this case? • Ans: The switch will flood the DST MAC until the 4th port reply. • MAC table build by: learning from the SRC MAC or by forwarding to DST MAC. • All devices on the switch are in the same broadcast. • Q: If the DST MAC multicast (01005eXXXXXX)=W, so how the switch know the ports that connected to the PCs that related to the multicast? • ANS: The switch will flood to all ports, and the PCs that contain the multicast MAC address will receive the data. • The switch floods in the following cases: BUM(Broadcast-Unknown-Multicast) LAN Switch Functions Created by: Ahmed Nabil Organized by: Abdullah Ahmed Forwarding • It is done using micro-segmentation in the switch • The micro-segmentation allows each node to obtain access to the full bandwidth of the transmission channel instead of having to share it with other nodes on the network. • If PC (A,B,C) want to connect to the router, so it can, because inside the switch it’s a Mesh topology. • Switch operate in full duplex • HUB operates in half duplex (CSMA [Carrier Sense Multiple Access with Collison Avoidance]) • The Switch contain Buffer (RAM on each port) to let the data get out in queues, FIFO (First Input First Output) LAN Switch Functions Created by: Ahmed Nabil Organized by: Abdullah Ahmed • All devices on switch are separated collision domainsمش بيحصل تصادم • All devices on Hub are in same collision domain بيخبطوا بعض Created by: Ahmed Nabil Switching Methods Organized by: Abdullah Ahmed • Cut Through Method: شق طريقكAt this method the switch wait 14bytes of the frame then forward it. It wait for the 8-byte of preamble & 6-bytes of DST MAC, then forward the frame. After first frame, only it wait 6-bytes (DST MAC). • Store & Forward Method: عبيلوا واديلواAt this method the switch will wait the full frame to check error, then forward it. Error Types: 1. CRC error 2. Runt frame error (less than 64-byte) 3. Giant frame error (more than 1518-byte) Error check ASIC decide if the frame has no error so it forward, but if has an error it will drop. Created by: Ahmed Nabil Switching Methods Organized by: Abdullah Ahmed Created by: Ahmed Nabil Switching Methods Organized by: Abdullah Ahmed • Adaptive Cut Through: متكيفAt this method the switch monitor the frame, if its error exceeding 10%, so use Store &Forward method. If the frame has error less than 10%, so use cut through. Ex: Like the police officer at the trap, he can let the cars to move and don’t stop (Cut through), but if there is any weapon or drugs in a car, he will stop it and all cars after (Store & forward), after a while he return to open the trap again and let the car move without stop (Cut Through Method) Created by: Ahmed Nabil Remove Layer 2 Loops: Organized by: Abdullah Ahmed • Both switch 1 & switch 3 will receive a copy of the ethernet frame. • Switch 1 & switch 3 start search for the DST MAC address in their MAC address tables • If they fail to find the MAC address, they will flood it, which will return again to switch 4, & starting the layer 2 loops. • These loops can be stopped by using STP (Spanning Tree Protocol). • At American switches, the loops will let the switch slow. • At china switches, the loops will let the switch burn. Created by: Ahmed Nabil Organized by: Abdullah Ahmed Layer 3 (Internet Layer/Network Layer) • It is responsible for end to end data delivery. • Each LAN is called network address, summary address, which used in routing table like: 10.0, 11.0, & 12.0 • Logical Addressing = IP addressing It is S/W address given by configurations used to send data from end to end. • The network part organized by IANA (Internet Assigned Number Authority) • In Egypt instead of IANA is TE Created by: Ahmed Nabil Routing techniques • Forwarding: بيتخضIP address الراوتر لما مش بيعرف • The router if know the DST address will forward • If the router doesn’t know, so it will drop • If there is a broadcast, it will process Organized by: Abdullah Ahmed IP (Internet Protocol) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Internet layer = end to end layer • It is responsible for: Logical Address end to end address (IP address) Encapsulation from end to end (IP header 2nd header in the frame) IPV4 address 32-bit 2^32= 4,294,967,296 IP It represented in doted decimal octet. 192.168.1.260 not valid, because the fourth octet exceeds 255 IPV4 Address Classes Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Class A network . Host . Host . Host from 1126 One IP network (Class A)cost 16,777,214 $ as it provides 2^24 -2= 16,777,214 host. (TE buy one) Ex: network with IP 41.0 network address = 41.0.0.0, Direct broadcast = 41.255.255.255, & IPs for hosts = 41.0.0.1 41.255.255.254 The direct broadcast feature cancelled to avoid the viruses, & hackers. • Class B network . network . Host . Host from 128191 (1st octet) No. of hosts = 2^16-2=65,534 Hosts Ex: network with IP 170.5 network address = 170.5.0.0, Direct broadcast = 170.5.255.255, & IPs for hosts = 170.5.0.1 170.5.255.254 IPV4 Address Classes Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Class C network . network . network . Host from 192223 (1st octet) No. of hosts = 2^8-2=254 Hosts Ex: network with IP 193.45.44 network address = 193.45.44.0, Direct broadcast = 193.45.44.255, & IPs for hosts = 193.45.44.1 193.45.44.254 • Class A, B, & C (unique IP) unicast • • • • Class D 224-->239 used for multicast 224.x.x.x 239.x.x.x Use in games online or any multicast network. • Sending data simultaneously to Multiple receivers doesn’t burden the source • 1IP of class D = 10$ Created by: Ahmed Nabil IPV4 Address Classes Organized by: Abdullah Ahmed • Class E: 1ST octet 240254 • Used for researchers & military apps (windows for military specs) • 100IP = 1$ • Egyptian army doesn’t use the class E to avoid spying. Created by: Ahmed Nabil Special Cases For IPV4 Organized by: Abdullah Ahmed • 0.x.x.x use only 0.0.0.0 for all IPV4 addresses Home router configured to let the WAN port is 0.0.0.0, to let it talk to any public IP. (last resort سكة اللى ملوش سكة )اخر مالذ • 255.x.x.x use only 255.255.255.255 general broadcast • Local broadcast only (Inside LAN only) (Non-routable) • Ex: 57.255.255.255 (Direct broadcast) (used in WAN) (Routable) Any router programmed to stop this general broadcast, to check it first, and has two options, 1st : if it want to forward it, 2nd or to stop it forever. • 127.x.x.x use only 127.0.0.1 • Used for loopback test internal S/W Test TCP/IP protocols stack (layers) • Ping on 127.0.0.1, to check if the windows layers ok or not. Created by: Ahmed Nabil Organized by: Abdullah Ahmed IPV4 Shortage • network Classification For Customer Scenario In Past: network need Class Waste IP 6 IPs Class C (256 IP) 250 IP 536 IPs Class B (65,536 IP) 65,000 IP 377,216 IPs Class A (16,777,216 IP) 16,400,000 IP • IPV4 Solutions: IPV5 (64 bit) researches only IPV6 (128 bit) 2^128 = 3.4x10^38 IPs 5x10^28 IPV6/human End of IPV4 in 2040 Public IP Real IP Unique IP Created by: Ahmed Nabil Private Addressing Organized by: Abdullah Ahmed • Private IP: free IP used in private LAN or private WAN Class A: 10.X.X.X (1 network = 16,777,216 IP) Class B: 172.16.X.X 172.31.X.X (16 network) Class B: 169.254.X.X APIPA (Automatic Private IP Address) Class C: 192.168.0.X192.168.255.X (256 network) Created by: Ahmed Nabil NAT (network Address Translation) Organized by: Abdullah Ahmed Created by: Ahmed Nabil Subnetting Organized by: Abdullah Ahmed • It is dividing major networks into smaller networks called subnets. • Subnet classified into packages: 4-IP, 8-IP, 16-IP, 64-IP, 128-IP, class-C(256-IP), 512-IP, & 1024-IP,…..,class-(B) 65536IP,……,(class-A)16,777,216-IP. Ex: The customer request 60 public IPs from IANA: 200.7.8.x Subnet-1: 200.7.8.0network Address,…..,200.7.8.1,…,200.7.8.63 direct broadcast for this subnet Subnet-2:200.7.8.64network Address,….,200.7.8.65,…,200.7.8.127direct broadcast for this subnet Subnet-3:200.7.8.128network Address,….,200.7.8.129,…,200.7.8.191direct broadcast for this subnet Subnet-4:200.7.8.192network Address,….,200.7.8.193,…,200.7.8.255direct broadcast for this subnet The class C divided 4 subnets x 64-IPs = 256-IP So this customer will take the package 64-IPs, where actually they are 62-IPs, buying them with 62$/year. Created by: Ahmed Nabil Subnetting Organized by: Abdullah Ahmed • Ex: the customer request 30 public IPs from IANA • 200.7.9.x Subnet-1: 200.7.8.0subnet Address,…..,200.7.8.1,…,200.7.8.31 direct broadcast for this subnet Subnet-2:200.7.8.32subnet Address,….,200.7.8.33,…,200.7.8.63direct broadcast for this subnet Subnet-3:200.7.8.64subnet Address,….,200.7.8.65,…,200.7.8.95direct broadcast for this subnet Subnet-4:200.7.8.96subnet Address,….,200.7.8.97,…,200.7.8.127direct broadcast for this subnet Subnet-5 ……… subnet -8 The class C divided 8 subnets x 32-IPs = 256-IP. So this customer will take the package 32-IPs, where actually they are 30-IPs, buying them with 30$/year. If the customer needs 33-IP, so he will take 64-IP package or to loose one IP & take 32-IP network Created by: Ahmed Nabil Subnet Mask Organized by: Abdullah Ahmed • The subnet mask determines the number of IPs. • Calculations the no. of host IPs/subnet= 2^(32-new mask) • Calculations the no. of subnets =2^(new mask – old mask) Ex: No. of Host IPs for /28 ? Ans: 2^(32-28)= 16-host IPs • /321-IP, /312-IP, /304-IP, 29/8-IP, 28/16-IP, 27/32-IP, 26/64-IP • /8Class-A default16,777,216 IP • /16Class-B default65,536 IP • /24 Class-C default 256 IP • Maximum mask /0, Minimum mask /32. • 2^6 = 64, 2^7 = 128, 2^8 = 256, 2^9 = 512 Created by: Ahmed Nabil Subnet Mask Organized by: Abdullah Ahmed • Ex1: For the major network 197.60.50.0/24, we need to divide it using new subnet mask /25 Ans: no. of IP/subnet = 2^(32-25) = 128 Host IP no. of subnets = 2^(25-24) = 2 subnets • Ex2: For the major network 200.80.20.0/24, we need to divide it using new subnet mask /28 Ans: no. of IP/subnet = 2^(32-28) = 16 Host IP no. of subnets = 2^(28-24) = 16 subnets • Ex3: For the major network 173.15.0.0/16, we need to divide it using new subnet mask /23 Ans: no. of IP/subnet = 2^(32-23) = 512 Host IP no. of subnets = 2^(23-16) = 128 subnets Created by: Ahmed Nabil Subnet Mask Organized by: Abdullah Ahmed • Regarding Ex3: 512 IPs per subnet, • [ 173.15.0.0Subnet Address,173.15.0.1,….173.15.0.255,173.15.1.0, 173.15.1.1,…..173.15.1.255(direct broadcast)] 1st subnet = 512 IP • [ 173.15.2.0Subnet Address,173.15.2.1,….173.15.2.255,173.15.3.0, 173.15.3.1,…..173.15.3.255(direct broadcast)] 2nd subnet = 512 IP • And so on, Created by: Ahmed Nabil Subnet Mask (Another Method) Organized by: Abdullah Ahmed • It is 32-bit mask starts with 1’s & end with 0’s • 1111111Network part,..0000000Host part • Ex: 10.7.50.66 1st octet is Network part, 2nd 3rd 4th octets are host part 11111111.00000000.00000000.00000000 /8 255 . 0 . 0 . 0 /8 default • Ex: 172.16.5.80 1st 2nd octets are Network part, 3rd 4th octets are host part 11111111. 11111111.00000000.00000000 /16 255 . 255 . 0 . 0 /16 default • Ex: 192.16.5.80 1st 2nd 3rd octets are Network part, 4th octets are host part 11111111. 11111111.11111111.00000000 /24 255 . 255 . 255 . 0 /24 default Created by: Ahmed Nabil Subnet Mask (Another Method) Organized by: Abdullah Ahmed • Rule: No. of IPs = 256 – [mask . mask . mask . mask], then multiply the results • Ex: Mask: 255.255.255.240, no. of Host IPs? Ans: 256 – [255.255.255.240] = 1*1*1*16= 16-IP • Ex: Mask: 255.255.254.0, no. of Host IPs? Ans: 256 – [255.255.254.0] = 1*1*2*256= 512-IP • Ex: Mask: 255.255.252.0, no. of Host IPs? Ans: 256 – [255.255.252.0] = 1*1*4*256= 1024-IP • Ex: Mask: 255.255.0.0, no. of Host IPs? Ans: 256 – [255.255.0.0] = 1*1*256*256= 65,536-IP IPV4 (Internet Protocol Version 4) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Internet layer = end to end , end to end protocol version 4 • It is responsible for: Logical Addressing: IPV4 address – Classes (A,B,C) – Private IP (because of the shortage happened in IPV4) – Subnetting T End to End encapsulation H H H data • Type of service (TOS): (1-byte, used only 3 bits where 2^3 = 8 priorities) It is used for (QOS) Quality of Service, it reflects priority, highest is the best. Data [HTTP, FTP, SMTP]0,1,2,3 Video4, Voice5, Router (OSPF) 6, Switch7(switch more important than router, because switch has the feature of STP to stop loops before going to router) Created by: Ahmed Nabil Frame format of TCP/IP Organized by: Abdullah Ahmed TTL (Time to Live) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • It is responsible for removing L3 loops • It is 1-byte = 8-bit [0255] for all IOS except windows (7-bit [0127]) • TTL counter decrease one when passing through one hop, so every hop the counter decreased one. • When TTL become 1 the router will drop the frame. • Max. hop to hop is 30 router (between japan & brazil) Internet Layer Protocol Created by: Ahmed Nabil Organized by: Abdullah Ahmed • ICMP: (Internet Control Messaging Protocol) End to End troubleshooting Echo request & echo reply (Ping check) Windows 4 ping, Linux Infinity ping, Android/iOS/IOS: 5 ping (iOS Apple, IOS intermediate devices) Tracert: when no reply using ping, then use Trace. Tracert: It shows you each router, the packet has pass through it until it reaches to its destination, or fails to reach, & how long it take to travel, between each router and another router. Created by: Ahmed Nabil Getting started for End to End data Delivery Organized by: Abdullah Ahmed DNS (Domain Name Server) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • It is the phonebook of the IPs, it translates website (domain) names into IP addresses. IPs السيرفر المركزى المتسجل عليه اسماء • If you type the IP of Facebook instead of typing www.facebook.com, it will reply more faster, because the domain name will not need to travel to DNS sever to bring the IP address of Facebook, then travelling to Facebook server. • Root server is the main server all over the world. • Request your public IP from IANA, then go to WWW to name your IP. • Google has two DNS server to help the root DNS, where has a copy of data that is in root DNS. Created by: Ahmed Nabil DNS (Domain Name Server) Organized by: Abdullah Ahmed • Ex: IP: 192.168.1.4 Mask: 255.255.255.0 Default Gateway:192.168.1.1 (Router Ip) DNS:8.8.8.8 • The company and its branches, that uses a private network so it doesn’t need DNS. • If the DNS server that installed in TE to help root DNS server, flush the DNS of certain IP, this DNS server will ask the root DNS server to send it. • DNS google server: 8.8.8.8, or 8.8.4.4 Created by: Ahmed Nabil Organized by: Abdullah Ahmed DHCP (Dynamic Host Configuration Protocol) • To assign IPs for the PCs, you can use the DHCP. • If DHCP fails to assign IPs, then the APIPA (Automatic Private IP Addressing) will assign the IPs automatically. • The PC sent DHCP Discovery to the router, then the router reply by DHCP offer, then the PC sends DHCP Accept & Request Reservation, then the router sends DHCP ACK. • This sign when appears in your mobile, means that your mobile got IP and can access the internet. • The PC sends three times the DHCP Discovery to the router, if the router didn’t reply, then the APIPA will give IP & Mask, but not gateway & DNS. • APIPA used in LAN only, not in WAN. • APIPA Addresses169.254.x.x/16, it gives the IP to PC, then asks the another PCs if they took this IP or not Created by: Ahmed Nabil Cmd Commands Organized by: Abdullah Ahmed • Getmac show the mac of the port cards. • 127.0.0.1(TCP/IP MODEL IP) loopback test (local Test). • If you enter manually the IP 169.254.x.x, and assigns a default gateway, the router will drop it, because it programmed not to pass it, to the WAN. • The IP address: 192.168.1.0 has been used, with mask 255.255.255.240, means 16 host addresses. 192.168.1.0 Network address 192.168.1.1router address, 192.168.1.15 direct broadcast • Arp –a display the IP address (static or dynamic) & the mac. Created by: Ahmed Nabil ARP (Address Resolution Protocol) Organized by: Abdullah Ahmed • It is used to get the destination MAC address. (Resolve unknown MAC) • ARP scenario: Host A sends ARP request to Host B, then Host B reply with ARP Reply, then Host A start sending the data to Host B. ARP Table Summarization of MAC & IP Created by: Ahmed Nabil Organized by: Abdullah Ahmed • SRC MAC Burnt in ROM • DST mac ARP • SRC IP DHCP, if fail, then APIPA • DST IP DNS بيتشافrouter شفاف وswitch • • Next hop never will be the switch, because it doesn’t has MAC, which it will be the router or DTE. Created by: Ahmed Nabil Inside Networks • Inside each network there are three types of IPs: 1- Network address: All host bits =0 used in routing table 2- Direct broadcast address: All host bits = 1 used with protocols & application 3- Host address: All host bits not equal ZEROs or ONEs used with DTEs Organized by: Abdullah Ahmed Created by: Ahmed Nabil Subnetting Examples Organized by: Abdullah Ahmed • Ex-1:For the given host address: 197.20.30.130/25 Find: - Subnet Address - Direct broadcast Address Ans: 197.20.30.130/25 197.20.30.10000010, bold = network part, not bold = host part Host part = 0’s 197.20.30.10000000 197.20.30.128 subnet address Host part = 1’s 197.20.30.11111111 197.20.30.255 direct broadcast address Created by: Ahmed Nabil Subnetting Examples Organized by: Abdullah Ahmed • Ex-2:For the given host address: 200.7.8.65/26 Find: - Subnet Address - Direct broadcast Address Ans: 200.7.8.65/26 200.7.8.01000001, bold = network part, not bold = host part Host part = 0’s 200.7.8.01000000 197.20.30.64 subnet address Host part = 1’s 200.7.8.01111111 200.7.8.127 direct broadcast address Created by: Ahmed Nabil Subnetting Examples Organized by: Abdullah Ahmed • Ex-3:For the given host address: 172.15.5.0/23 Find: - Subnet Address - Direct broadcast Address Ans: 172.15.5.0/23 172.15.00000101.00000000, bold = network part, not bold = host part Host part = 0’s 172.15.00000100.00000000 172.15.4.0 subnet address Host part = 1’s 172.15.00000101.11111111 172.15.5.255 direct broadcast address no. of IPs/subnet = 2^(32-23) = 2^(9) = 512 no. of subnets = 2^(23-16) = 2^(7) = 128 Layer 4: Transport Layer Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Layer 3 : is responsible for end to end delivery • Layer 4 : is responsible for end to end control ()معالجة المشاكل Segmentation(dividing data into smaller parts) 1460-byte تقطيع Error Detection(CRC) 2-byteتصوير Addressing using S/W port no. 2-byte(16 bit)-(065535) ترقيم • Port no. consists of: Well known ports: 01023 (registered ports) FTP20-21, Telnet 23, SMTP 25, HTTP80, HTTPs443, POP3110 ports number of servers, if the server receive data with port no. 25 at layer 4, so I want SMTP Used by users as session address (102465,535) (unregistered ports) if I open uber, WhatsApp, & Facebook, the TCP/IP model of my mobile will give port no. (session no.) to each app, so TCP/IP tell to the server of Facebook, when you want to talk with me, send on port no. that has created by my TCP/IP. Created by: Ahmed Nabil Layer 4: Transport Layer Organized by: Abdullah Ahmed Created by: Ahmed Nabil Socket Number • Socket number like : 2.2.2.2:80 192.178.3.2:20 Organized by: Abdullah Ahmed TCP/UDP Created by: Ahmed Nabil Organized by: Abdullah Ahmed • TCP (Transmission Control Protocol) ادق ولكن يأخذ وقت 7-way handshake Data (HTTP-HTTPs-FTP-SMTP-POP3-Telnet-SSH) • UDP (User Datagram Protocol)انجز وال يأخذ وقت Realtime-Network management-TFTP(Trivial FTP)(upload & download small files(trivial files)(M-bytes), Trivial network (small network=LAN)-RTP (voice & video), SNMP, Boot P, DHCP • Between User and server use UDP, but between server & server use TCP. Created by: Ahmed Nabil SNMP (Simple Network Management Protocol) Organized by: Abdullah Ahmed • It is a network management protocol which is used to manage (control and monitor) the network infrastructure devices (Routers, Switches, Network Servers, etc.). • It let the administrator know the details of the network, which devices are active & others are inactive. Created by: Ahmed Nabil Organized by: Abdullah Ahmed UDP Header TCP (Connection Oriented) • Regarding PC-B, it request from PC-A to send only two segments, may because the PC-B is now busy serving another apps or instead of PC-B a server which may serving another users. • At session termination the PC send message to the server that he finished, to let the server collect the segments to be a completed data. Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Routed Protocol vs. Routing Protocol Organized by: Abdullah Ahmed • Routed Protocol: It is a protocol that carry user data traffic from end to end, this done by: Logical address (S/W address)(S/W port no. & IP address) End to End encapsulation (IPV4 header (20-byte) & TCP/UDP header(20/8-byte)) Ex: IPV4, IPV6, IPx, Apple Talk, TCP, & UDP. • Routing Protocol: It is exchange of information (signaling )ضبط الشغلbetween router, so each router, tell others about network it can reach. Ex: Building routing table Created by: Ahmed Nabil Routing Classification Organized by: Abdullah Ahmed Routing Classification Dynamic Classification Static Classification Building Routing table manually IGP(Interior Gateway Protocol ) EGP(Exterior Gateway Protocol) RIP1-RIP2 (IGRP-EGRP)Cisco ISIS-OSPF EGP-BGP Routing Classification Created by: Ahmed Nabil Organized by: Abdullah Ahmed • These protocols understand subnetting (classless)RIP2, EIGRP, BGP, OSPF & ISIS (NEW), • These protocols don’t understand subnetting (classful[A,B,C])RIP1, IGRP, EGP (OLD) • Protocols that work inside autonomous system IGP (RIP1, IGRP, RIP2, EIGRP, ISIS, OSPF) limited distance routers • Protocols that work between autonomous system EGP (EGP, BGP) limitless distance routers, • IANA provide the service provider with public IPs and Autonomous system number (AS no.) ()مثل رقم سجل تجارى • AS no. (from 165535) can IANA give for SPs Created by: Ahmed Nabil Autonomous System Organized by: Abdullah Ahmed Created by: Ahmed Nabil Building Routing Table Organized by: Abdullah Ahmed • Static Routing: Building routing table manually Used if the network is simple (if only single path exists to DST) • Dynamic Routing: Building routing table automatically (use protocols S/W) Used if network is complex (many paths exist to DST) Static Routing • It is administrator overhead. • The router can get ARB table as its DTE like the PC. • Branch 1 (config)# ip route 15.0.0.0 255.255.255.0 S0 • Head Quarter (config)# ip route 11.0.0.0 255.255.255.0 S1 Created by: Ahmed Nabil Organized by: Abdullah Ahmed Static Routing • Show ip route Created by: Ahmed Nabil Organized by: Abdullah Ahmed Static Routing Created by: Ahmed Nabil Organized by: Abdullah Ahmed • You can write the vector name of the exit port, or the ip address of another port of the next router, as shown: Home Router Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Several routes between SRC & DST Organized by: Abdullah Ahmed • If there are two ways between SRC & DST the router will choose the trace with lowest no. of hops, to be the main way, & the another one will be backup (dimmed). • When the main way down, the backup way become in service. • When there are two routes with the same no. of hops, what happens that the two routes carry the traffic, which called load balance or load sharing. Dynamic Routing Created by: Ahmed Nabil Organized by: Abdullah Ahmed • RIP1 (Routing Information Protocol version 1) & IGRP (Interior Gateway Routing Protocol) Distance vector • RIP2 & EIGRP (Enhanced Interior Gateway Routing Protocol)Advanced distance Vector (know how to bring the MASK) • ISIS (Intermediate System to Intermediate System) & OSPF (Open Shortest Path First) Link State • EGP & BGB EGP • Distance (metric) Hop count RIP2 (Routing Information Protocol 2) Created by: Ahmed Nabil Organized by: Abdullah Ahmed Startup just after configuration [Router send its routing table to another router throught 3 H & 1 T] [If there is two paths to DST the router will choose the lowest hop] RIP2 (Routing Information Protocol 2) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • According to the router, after 3 minutes(Flush time=hold time=dead time) the router flush the routing table of the another inactive router, so to avoid this flushing, every 30 seconds will send activity between the routers to insure that they are alive (Update & Advertisement). • Multicast IP address (224.0.0.9)send to the routers who work on RIP2 and only these routers will process. • RIP2 waste memory, processing, & BW. • RIP2 working good with only 15 routers, more than 15 routers will be slow. • Split Horizon: route learnt from interface, should never be advertised back on same interface. It save resources, because it avoids routers to send to each others, the ip addres of the interface two times. RIP2 (Routing Information Protocol 2) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Triggered Update: sending update that the route is failed, and to inform another router that this network 13.0.0.0/24 with metric (hop)= infinity. • Max no. of hops = 15 at 1970, so infinity = 16 poisoned route • Max no. of hops = 30 nowadays, so infinity = 31 poisoned route Created by: Ahmed Nabil EIGRP (Enhanced Interior Gateway Routing Protocol) Organized by: Abdullah Ahmed The best feature in EIGRP that it has successor & feasible successor. Startup: • (Config)# router eigrp As# (1-65,535) As# [0reserved , 222cisco customers, 65,000 for free] • The router that are in the same autonomous system should have the same AS no. • Ex: Router A router eigrp 100 Router B router eigrp 200 Router C router eigrp 300 False because have different autonomous numbers. • Command show run to know the AS. • Support routing for all routed protocols IPV4, IPV6, IPx, & Apple Talk Created by: Ahmed Nabil EIGRP (Enhanced Interior Gateway Routing Protocol) Organized by: Abdullah Ahmed • Multicast IP address (224.0.0.10)send to the routers who work on EIGRP and only these routers will process. • Sending hello message three times (dead time=hold time) to another router, if there is no reply, it will consider it dead. EIGRP Neighbor table: Created by: Ahmed Nabil EIGRP (Enhanced Interior Gateway Routing Protocol) Organized by: Abdullah Ahmed • EIGRP topology table like مسودة which contain all the routing Protocols of the routers in network. • Successor (best path) included in the routing table & topology table. • Backup path not included in routing table only in topology table Created by: Ahmed Nabil EIGRP (Enhanced Interior Gateway Routing Protocol) Organized by: Abdullah Ahmed Neighbor discovery: Handshaking = exchange of hello Routing discovery: Exchange of update Routing table Created by: Ahmed Nabil EIGRP (Enhanced Interior Gateway Routing Protocol) Organized by: Abdullah Ahmed • Convergence steady state • Doesn’t send routing table continuously, only send at startup & at change. No periodic table It’s a periodic hello If the speed link more than T1 (1.5Mb/s), then there will be periodic hello every 5 seconds If the speed link less than T1 (1.5Mb/s), then there will be periodic hello every 60 seconds. It sends hello message to act as keep alive. Created by: Ahmed Nabil EIGRP (Enhanced Interior Gateway Routing Protocol) Organized by: Abdullah Ahmed Change (see next slide) • New network appears • From router A to B or from Router A to c: 1. the network appear 2. put it in the topology table of A 3. put it in routing table of A 4. update router B, with the new network • From router C to D: 5. put it in the topology table of C 6. put it in routing table of C 7. update router D, with the new network Created by: Ahmed Nabil EIGRP (Enhanced Interior Gateway Routing Protocol) Organized by: Abdullah Ahmed Created by: Ahmed Nabil EIGRP (Enhanced Interior Gateway Routing Protocol) Organized by: Abdullah Ahmed If the successor (best path) has been failed, & there is feasible successor (FS): • The FS will be the main way. • It already in the topology table, then to the routing table instead of the failed successor. Created by: Ahmed Nabil EIGRP (Enhanced Interior Gateway Routing Protocol) Organized by: Abdullah Ahmed IF the successor has failed with no feasible successor: (see next slide) (step 1) • Router A will choose path, as it can’t reach to 15.0.0.0. • It will update its topology table, then its routing table. Step(4,5) • The router B will send (Query update) to router A with metric = 4,xxx,xxx,xxx (step 3) • The router A reply that there is another path. (step 6) • The topology table of router B changed by the new successor, then update also its routing table. (step 2,7) Created by: Ahmed Nabil EIGRP (Enhanced Interior Gateway Routing Protocol) Organized by: Abdullah Ahmed Created by: Ahmed Nabil OSPF (Open Source Path First) Organized by: Abdullah Ahmed • Open open source (accept to edit the protocol) • Multicast IP address (224.0.0.5) send to the routers, which work on OSPF, & only these routers will process. • It use link state technique ()خد اوريك قصة حياتى • @Startup after configuration • (Config)# router ospf (AS no.) • Neighbor discovery handshaking “exchange of hello” • OSPF Neighbor table Neighbor IP • show ip ospf neighbor 10.1.1.2 11.1.1.2 Interface S0 S1 Created by: Ahmed Nabil OSPF (Open Source Path First) Organized by: Abdullah Ahmed Routing discovery • Each router will form a packet, descripting itself called LSA. • Exchange of updates routers send link state advertisement (LSA) to each others Link State-metric-BW Advertisement 9.1.1.1/24 10Mb/s Router name 10.1.1.1/30 64kb/s Router name 11.1.1.1/30 64KB/S Router name • Each neighbor that receives LSA will take a copy of it in its LSDB (Link State Data Base) & send another copy as it is to all other neighbors. • Show ip ospf database Created by: Ahmed Nabil OSPF (Open Source Path First) Organized by: Abdullah Ahmed • Dijkstra Algorithm (Shortest Path First SFP) • Each router will take the data inside the LSDB & draw a map for router and paths which inside network. • Routing table of router W. 9.1.1.0/24 E0 10.1.1.0/24 S0 11.1.1.0/24 S1 12.1.1.0/24 S0 13.1.1.0/24 S1 14.1.1.0/24 S0-S1 • External Note: The 1st ping drop because the router take a time to get the ARB table (request, because it flush every 5 minutes if there is no activity) Created by: Ahmed Nabil Dynamic Routing Protocols Comparison Organized by: Abdullah Ahmed RIP2 EIGRP OSPF BGP It is advanced distance vector standard. It is advanced distance vector (cisco protocol) It is link state standard protocol It is exterior gateway protocol (works between ASs) It is classless protocol (understand subnetting) It is classless protocols It is classless protocols It is a classless protocols Optional support authentication (password is sent with updates for authentication) Optional support authentication Optional support authentication Optional support authentication It sends periodic updates every 30 seconds from all interfaces, using multicast 224.0.0.9 (reserved for RIP2 updates) Sends the full routing table at startup, & change, using 224.0.0.10, @convergence: no periodic –periodic hello Sends LSA at startup, uses multicast address 24.0.0.5 – 224.0.0.6 Sends full routing table at startup using unicast, manually configure neighbors Sends triggered update at change, obey split horizon (send the effected network & the all other networks in routing table) Sends triggered partial update at change, obey split horizon (sends only the effected network not all the networks) Sends triggered partial LSA at change, & no split horizon because (it telling its story to another router, not included the network name between the two routers (10.1.1.0), but it tells about the ip address of its interface (10.1.1.2), so it doesn’t need split horizon( support split horizon, &sends batched updates every 30 seconds (not triggered update to save processing because the rate of change in the networks all over the world is 1000 change/second, so it will take to much processing to trigger every change, so it updates the network every 30 seconds) Created by: Ahmed Nabil Dynamic Routing Protocols Comparison Organized by: Abdullah Ahmed RIP2 EIGRP OSPF BGP Use bellman-ford algorithm to calculate the best path Use DUAL algorithm to calculate the best (successor) & backup (feasible successor) paths Use Dijkstra algorithm (SPF algorithm) to calculate the best path. Use BGP algorithm to calculate the best path Symbolic routing table (R) Symbolic routing table (D) & (D Symbolic routing table (O) EX)external Symbolic routing table (B) Administrative distance=120 Administrative distance=90, 170 external between autonomous but not recommended Administrative distance=110 Administrative distance=20, 200 Metric is measured by hops – max 15-infinity 16 (limitation) Metric is composite of = 256*[10^7/BW+(10*delay)] Metric is cost = 10^8/BW Metric is composite of 10 attributes Support auto summary Support auto summary Support hierarchical design Support auto summary (by default) Support equal load sharing- 4 by default 16 by configuration Support equal & unequal load sharing – 4 by default 16 configuration Support equal load sharing- 4 by No load sharing by default default 16 by configuration Dynamic Routing Protocols Comparison Created by: Ahmed Nabil Organized by: Abdullah Ahmed • The administrative distance ranked as the least is the best, so for example if the RIP2 has admin. dist. 120, & the OSPF has admin. dist. 110 . So the OSPF will be preferable than RIP2. • IETF (Internet Engineering Task Force): concerned with the evolution of the Internet architecture and the smooth operation of the Internet. It responsible for setting the admin dist. of routing protocols. • If the router has option to go to DST through connected, static, or any routing protocols, it will use the connected as it has the least admin. distance. Protocol Administrative distance (priority) (0-255) RIP2 120 ISIS 115 OSPF 110 EIGRP 90 , 170 BGP 20 , 200 Static 0,1 Connected 0 Dynamic Routing Protocols Comparison Created by: Ahmed Nabil Organized by: Abdullah Ahmed • The router A needs to reach DST so there are three paths, • If A use RIP2, then will use S2 (64kb/s), where it’s the lowest hops • If A use OSPF, then will use S3 (10Mb/s), where it’s the highest BW, which will give the lowest metric. • If A use the EIGRP (neglect speed), then will use S3, where it’s highest BW, which will give the lowest metric. • T1 speed name was assigned by AT&T company. Dynamic Routing Protocols Comparison Created by: Ahmed Nabil Organized by: Abdullah Ahmed • RIP2-EIGRP-OSPF they are MMA (Mask, Multicast, & Authentication) باالتفاقBGP) ولكنMulticast • كل حاجة بالخناق (ابعت AT&T • BGP Router configuration Flag A(config)# router bgp 1AS. no. A(config-router)# neighbor 1.1.1.2 remote AS 2 B(config)# router bgp 2AS. no. B(config-router)# neighbor 1.1.1.1 remote AS 1 • AT BGP routers, if router B not configured to receive data from router A, it wil rejects any data come from router A. • As these routers carry all the traffic of a specific country, so from security wise its configured not to receive any data, until informing this router, that there is a traffic will come from certain BGP router. Choosing best path criteria Created by: Ahmed Nabil Organized by: Abdullah Ahmed • To choose the best path: least admin distance (if there is more than routing protocols) Then, least metric (if there is one routing protocols, & more than one paths to DST) Then, load sharing (load balancing) (If there is one routing protocols, & the paths have same metric) • EIGRP at the load balancing case, if there are more than path, but there is path faster than path, so the faster path will take traffic more than the slower one. (3:1 or 2:1 depends on the speed of two paths) • To activate this feature: (config)# router eigrp 222 (config-router)# variance Created by: Ahmed Nabil OSPF (Hierarchical Design) Organized by: Abdullah Ahmed • Multiple area OSPF • OSPF problems: Need high CPU & Need big memory because of sending the LSAs ()قصة حياتى Instability-> will affects the whole autonomous system If there is disconnection at interface of a router in the network, router will sends a new LSA to all routers, & all routers will receives this LSA, & updates their LSDB with the new LSA, then sending their LSDB for all routers. So the instability in the network, because of the port is not connected well (flapping )مرفرف • If the network has more than 50 routers, the routers will be slow, due to the high processing needed in updating & notifying each others for any change. • So this AS network will divided into sub-ASs called areas (4,xxx,xxx,xxx), which router will knows the details (Type 1 LSA O) of other routers in its same area, & the summary (Type 3 LSA “O(OSPF) IA(Inter-area routes)”) of the other routers in different areas. OSPF (Hierarchical Design) Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Route Aggregation Organized by: Abdullah Ahmed • Route Aggregation consists of: Summarization & Supper-netting Summarization: It is grouping many subnets & advertise them as a bigger subnet Supper-netting (CIDR “Classless Inter domain Routing”): It is grouping many major networks & advertise them as one big super network. Summarization Super-netting Auto summarization Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Auto summarization summarized to the default mask classes (A,B,C) ()بغشومية • EIGRP & RIP2 understand summarization • If there is more than routers in Same AS#, & not seeing each other, because they have different AS# & different routing protocols The auto summarization has summarized the two network as the same (192.168.1.0/24) so the two interfaces (S1,S2) have the same network, which is wrong, so you should to stop the auto summarization in the router: (config)# router eigrp 222, (config-router)#no auto-summary OSPF operation • Its steps: 1. Create router ID 2. Neighbor discovery 3. Electing DR (Designated Router) & BDR (Backup DR) 4. Routes discovery Created by: Ahmed Nabil Organized by: Abdullah Ahmed OSPF operation Created by: Ahmed Nabil Organized by: Abdullah Ahmed • 1st send (hello my name is (router RID)) • 2nd send its LSA 9.1.1.1/24 speed RID 1. Creating router id (RID): (32-bit) 1stManually: it is highest IP address configured on loopback interface, its features (virtual-logical-internal-S/W-Always up) (Config)# interface loopback 0 (Config)# ip address 5.1.1.1 255.255.255.255/32 this mask gives only 1-IP 2nd Automatically It is the highest IP address configured on physical (NIC or WIC) active interface The router chooses IP of any interface and named the router id with this IP. OSPF operation Created by: Ahmed Nabil Organized by: Abdullah Ahmed 2. Neighbor discovery Exchange of hello=handshaking The new router when enter the network to be accepted from the other routers, it should contain some conditions called Neighbor-ship conditions: 1. Same authentication password (optional) 2. Same area ID (if the new router at area 1, & old one at area 2, its okay, but if the new one at area 18 so it will be rejected) 3. Hello interval = 10 sec (every 10 sec) 4. Same dead interval=4hello=40 sec OSPF operation Created by: Ahmed Nabil Organized by: Abdullah Ahmed 3. Electing DR (Designated Router) & BDR (Backup DR) • DR Welcome new comer First router that boots OSPF with enough time [40 sec], if the router didn’t receive reply waiting 40 sec, it will consider itself DR. Router having highest priority on interface [0-255 default 1] o (config)# ip ospf priority 0-255 (if the two routers open at the same time, then the DR will get the highest priority) Highest RID (if I didn’t set priority for routers, the OSPF will search for the router that has the highest RID, & set it as DR) • BDR will be the 2nd highest priority or RID after the DR • The rest of router that aren’t DR or BDR called DR others. OSPF operation Routes discovery Exchange of updates LSAs LSDB Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil OSPF configuration Organized by: Abdullah Ahmed • Virtual router: router can be divided into virtual routers from 165535 (config)# router ospf process id (165,535) [dividing router into sub-routers] • Wild card mask inverted subnet mask • Ex: [See next slide] 0000 0000 1111 1111 Exact match Don’t care (Config)# router ospf 1 (config-router)# network 10.0.3.0 0.255.0.255 area 0 =10.x.3.x Or (config-router)# network 10.70.80.90 0.255.255.255 area 0 = 10.x.x.x Or (Config-router)# network 10.5.3.6 0.0.0.0 area 0 (Config-router)# network 10.7.3.8 0.0.0.0 area 0 Area 2 (Config)# router ospf 2 (config-router)# network 192.168.1.0 0.0.0.255 area 0 = 192.168.1.x (S2 & S3) OSPF configuration Created by: Ahmed Nabil Organized by: Abdullah Ahmed Classless Protocols • RIP2 – OSPF – EIGRP – BGP – ISIS • They understand the following: Summarization & CIDR (super-netting) FLSM (Fixed Length Subnet Mask) VLSM (Variable Length Subnet Mask) • Class full Protocols RIP1 -IGRP Created by: Ahmed Nabil Organized by: Abdullah Ahmed WAN Introduction Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil WAN Introduction Main components of WAN network Organized by: Abdullah Ahmed WAN Introduction Created by: Ahmed Nabil Organized by: Abdullah Ahmed • CPE (Customer Premises Equipment): مجموعة اجهزة تحت السيطرة LANs • Local Loop may be: Copper cat-3speed = 8Mb/s & distance 15km OR Fiber speed:100Gb/s & distance 100km • Routing protocolsRIP1, RIP2, IGRP, EIGRP, BGP, OSPF, & ISIS Used to send & build routing tables • Routed protocols hop to hop protocols =IPV4 & IPV6 used to send data hop to hop in WAN • WAN speed: DS0 (Digital Speed 0)=64kb/s DS1 (Digital speed 1)= T1 (1.5Mb/s) & E1 (2Mb/s) DS3 (Digital speed 3)= T3 (45Mb/s) & E3 (34Mb/s) WAN Introduction Created by: Ahmed Nabil Organized by: Abdullah Ahmed • SDH is a standard technology for synchronous data transmission on optical media. • SDH uses the following Synchronous Transport Modules (STM) and rates: STM-1 (155 megabits per second), STM-4 (622 Mbps), STM-16 (2.5 gigabits per second), and STM-64 (10 Gb/s),….., STM-256 (40Gb/s). WAN Introduction Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Circuit switching point-to-point private WAN HDLC & PPP • Packet switching point-to-multipoint private WAN X.25,FR, & ATM • Broadband switchingPUBLIC WANPPPOE & PPOA WAN Switching Created by: Ahmed Nabil Organized by: Abdullah Ahmed • WAN Switching consists of: Private WAN & Public WAN • Private WAN (Circuit switching - Packet switching) • Public WAN (Broadband switching) Circuit switching (Point to Point microsegment) It is physical cable (circuit) from hop-to-hop, where all data move on same path point-topoint. Ex: HDLC [Cisco], & PPP The core switch decides what communication technology will use, HDLC, PPP, X.25…., based on this the routers will adapt. Old switches is point to point topology, but the new ones are mesh topology. The circuit switching used in both data & voice. At the voice it become [On demand circuit switching – Temp – Dynamic ] At the data it become [Dedicated circuit switching – static – Leased Line] WAN Switching Created by: Ahmed Nabil Organized by: Abdullah Ahmed Packet Switching It is point-to-multipoint technique based on VC (Virtual Circuit), each path between HQ & Brs called VCVC1,VC2, & VC3 Ex: X.25, Frame Relay, ATM (Asynchronous Transfer Mode)[10&40GBb/s] There are two options for the branches to talk to each other. 1st : Br1 send the data to Head Quarter (HQ), & HQ forward data to Br2 (Point to point topology) 2nd: Br1 send data directly to Br2 (Mesh Topology) Ex: 8Mb/s FR=100,000L.E 8Mb/s ATM=500,000L.E, because the speed of micro segmentation of ATM in Gb/s but FR in Mb/s. Created by: Ahmed Nabil WAN Switching Organized by: Abdullah Ahmed Broadband technologies Using all available frequencies, in order to gain higher speeds. Ex: VSAT, CATV, & DSL (Digital Subscriber Line) DSL ADSL SDSL (Asymmetric DSL) (Symmetric DSL) Download>Upload Download=Upload Home users Enterprises WAN Switching Created by: Ahmed Nabil Organized by: Abdullah Ahmed WAN Switching Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Types of DSLAM PPPOA (PPP over AM)old PPPOE (PPP over Ethernet)New • Modem(CSU/DSU)increase the low frequency into high frequency NAT (Network Address Translation) • Private IPs: Class A10.x.x.x Class B172.16.x.x 172.31.x.x, APIPA 169.254.x.x Class C(192.168.x.x) • At your company, you need the following Web server (your website and put the contents of website on a server) Email server (like Abdullah@bestle.com, ahmed@cisco.com) IPs for your Employees PCs Created by: Ahmed Nabil Organized by: Abdullah Ahmed NAT (Network Address Translation) • NAT Types: • Static NAT used with servers • Show ip nat translation Created by: Ahmed Nabil Organized by: Abdullah Ahmed NAT (Network Address Translation) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Dynamic NAT used with users • Use NAT pool to assign IPs to users • (config)# ip nat pool Name Start IP End IP • (config)# ip nat pool TE-data 41.1.1.3 41.1.1.62 netmask 255.255.255.192 • If you was working and go to the toilet and return again, you will found that you can’t access the internet, because the router after 5 minutes will flush the data, so you will wait until the NAT pool has a ready IP for you. NAT (Network Address Translation) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Dynamic NAT with overhead PAT(Port Address Translation) [ IP ] كله بيخمس فى نفس ال • Used with users • All the devices in the network will use the same public IP but with difference port number, maximum 65,535 devices with same public IP • If the company has 100,000 devices, so it needs only two public IPs. • Socket number = IP address + port number Created by: Ahmed Nabil Circuit Switching Protocols Organized by: Abdullah Ahmed Circuit Switching Protocols consist of: Encapsulation - Configuration - Operation • It is point to point or router to router Encapsulation • HDLC High Level Data Link Control flag Address Control Packet CRC • ISO HDLC Frame format Flag: used to alarm the receiver that there is a frame will be sent Address11111111 will be broadcast Control: used in operation • Cisco HDLC Frame format flag Address Control Type Packet CRC Type: inform the router the IP type: IPV4, IPV6, which decrease the time processing of the router, to know which IP type is. It gives binary equal to 4 for IPV4, & binary equal to 6 for IPV6 Created by: Ahmed Nabil Circuit Switching Protocols Organized by: Abdullah Ahmed • Cisco HDLC is default on all cisco WIC (1% used) • PPP (Point to Point Protocol) (99% used) flag Address Control Type • It gives binary equal to14 for IPV4, & give binary equal to 16 for IPV6 PPP Configuration • • • • • (config)# interface S0 (config-if)# no shutdown (config-if)# clock rate (config-if)# encapsulation PPP (layer 2 protocol) (data wear PPP H & PPP T ) Show ip interface brief Packet CRC Created by: Ahmed Nabil Circuit Switching Protocols Organized by: Abdullah Ahmed • The interface S0 at router has the status & protocol • Status: Down not write no shutdown Protocol: Down didn’t set the clock rate or mismatch protocol (PPP with FR which is wrong, must be PPP & PPP) The two router which connected together, must be the same L2 protocol. Circuit Switching Protocols • PPP operation private WAN • PPPOE operation public WANswitch very cheap • (config)# debug ppp negotiation @startup: (config-if)# encapsulation PPPoe Created by: Ahmed Nabil Organized by: Abdullah Ahmed Circuit Switching Protocols PPP Operation Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil PPP Authentication option • (config)#username Ahmed password cisco • (config)# int S0 • (config-if)# encapsulation pppoe • (config-if)# PPP authentication [PAP/CHAP] • PAP passwords are sent clear text • CHAP passwords are sent hashed by MD5 )(مشوهة Organized by: Abdullah Ahmed Created by: Ahmed Nabil PPP Authentication option • PAP(PPP Authentication Protocol) Organized by: Abdullah Ahmed Created by: Ahmed Nabil PPP Authentication option Organized by: Abdullah Ahmed • CHAP (Challenge Handshake Authentication Protocol) • Comparing the transmitted hashed password with received hashed password, if it’s the same so the Radius server will reply with ok. - One Time Protocol (OTP) Created by: Ahmed Nabil Packet Switching Organized by: Abdullah Ahmed Packet switching X.25, FR, ATM Private WAN FR speed: 64kb/s45Mb/s, X.25 45kb/s, & ATM (Asynchronous Transfer Mode)10&40Gb/s Frame Relay • It is a point-to-multipoint packet switching technology based on PVC (Permanent Virtual Circuit)(Micro segmentation in WAN) • FR Topologies 1. Point-to-point Topology: PVC with 8Mb/s=100,000 L.E/year Frame Relay 2- Point-to-multipoint Star- (Hub & spokes) No. of PVCs= n-1 = 4-1 = 3 It can carry 1024 virtual circuit (Virtual circuit) 3- Multipoint-to-multipoint (Full Mesh) topology: It decreases the time processing & overhead on HQ router No. of PVCs=n(n-1)/2= 4(3)/2=6 Created by: Ahmed Nabil Organized by: Abdullah Ahmed Frame Relay 4- Partial Mesh Topology Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Frame Relay Organized by: Abdullah Ahmed FR Encapsulation • It is called LAPF (Link Access Procedure for FR) LAPF not supported by cisco Flag Address Control Packet CRC Address: PVC Id X.25: 8-bit (X.25 number) speed of micro segmentation in Kb/s FR: 10-bit (DLCI=Data Link Circuit Id) 01023, reserved(015, 1023), used (161022)speed of micro segmentation in Mb/s ATM: 16-bit (VPI/VCI = Virtual Path ID/Virtual Circuit (channel) ID) (065,535)speed of micro segmentation in Gb/s • At LAN MACs, but at WAN there are DLCI, X.25 number, (VPI/VCI) • Cisco LAPF Flag Address Control To activate Cisco LAPF (Config)#int s0 (config-if)# encapsulation frame relay Type Packet CRC type 4 means IP4, 6 means IPV6 Created by: Ahmed Nabil Frame Relay Organized by: Abdullah Ahmed Another FR packet not related to Cisco: IETF LAPF Flag Address Control Type Packet CRC type 40 means IP4, 60 means IPV6 To activate IETF LAPF: (config)# int s0 (config-if)# encapsulation frame-relay ietf • Two routers with same FR packet format working normal, but one router with Cisco LAPF, & another one with IETF LAPF cannot work with each other. Frame Relay • Fame Relay operation Created by: Ahmed Nabil Organized by: Abdullah Ahmed Frame Relay Frame Relay operation steps: Created by: Ahmed Nabil Organized by: Abdullah Ahmed Frame Relay Created by: Ahmed Nabil Organized by: Abdullah Ahmed Frame Relay Routing Issue: Enabling the split horizon, results in rejecting the packets to go from Br1 to Br3, because according to split horizon, the route learnt from interface should never be advertised back on same interface To solve this issue: • Split horizon will be disabled HQ(config-if)#no ip split horizon • Use static routing • Use full mesh topology • Divide main interface into point to point sub interfaces 4,xxx,xxx,xxx sub interfaces (see next page) Frame Relay • Configurations of sub interfaces Regarding the command of (no ip address), its purpose to enable us to use the sub interfaces. Created by: Ahmed Nabil Organized by: Abdullah Ahmed Private WAN Technologies • Ethernet Switching: Used by large & richest companies. Flexible topology Very low delay Low latency Forward of Thousands of frames per seconds. Ex: Metro Ethernet Fiber Ethernet (SMF 8/125, 100KM, 100Gb/s) Address : MAC 48-bit Created by: Ahmed Nabil Organized by: Abdullah Ahmed Private WAN Technologies • Label Switching: Used by moderate companies Flexible topology Forward million of frames per second Ex: MPLS (Multiprotocol Label Switching) Address : label 20-bit Created by: Ahmed Nabil Organized by: Abdullah Ahmed VPN (Virtual Private Network) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • It is using public WAN to open private encrypted tunnels, between HQ & branches to simulate a private WAN. • In other words, it is building private WAN (HQ & branches), using public WAN, because its cheap. • VPN using DSL • VPN is only point to point which may be a drawback in some cases. • A tunnel is a virtual connection that can physically path through multiple router hops. However, the traffic between the start to last end of tunnel, appears as a single router hop. Created by: Ahmed Nabil VPN (Virtual Private Network) Organized by: Abdullah Ahmed • VPN uses static public IP, as when I closed the router and open it again, it will has the same IP all the time. Packet Header • The data and the private IP (SRC & DST), are hidden inside a new packet with its header has the public IPs (SRC & DST). • The private IPs are hidden, because the router can’t pass any IPs except the public IPs. SRC Public IP SRC Private IP 1.1.1.1 172.16.1.0 DST Public IP DST Private IP 2.2.2.2 192.168.1.0 + DATA VPN (Virtual Private Network) Created by: Ahmed Nabil Organized by: Abdullah Ahmed GRE • The data that flow in the tunnel is encapsulated by the GRE (Generic Routing Encapsulation). • GRE is a layer 3 protocol, which makes it very flexible. • It doesn’t provide any security, so the GRE packet can sent over an IPsec VPN. • GRE encapsulate the IP multicast packets into IP unicast packets • IPsec will protect the data, but it protect only unicast data IP packets. Ex: Two routers need to form OSPF neighbor ship across the service provider’s cloud, but OSPF communicates through IP multicasts, & as said the IPsec deal with IP unicast, but the GRE will encapsulate the IP multicast packets of OSPF, into IP unicast packets VPN (Virtual Private Network) Created by: Ahmed Nabil Organized by: Abdullah Ahmed VPN (Virtual Private Network) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • IPsec will form map CIA (Confidentiality, Integrity, & Authentication) used for tunnel protection Confidentiality سرية المعلومات Integrity المحافظة على سالمة المعلومة Authentication (Pre-shared password) Data encryption احبك احبوش MD5 OR SHA (Secure Hash Algorithm) DES (Data Encryption Standard) Data Copy Hashing SHA is stronger than MD5 by 50 times 3-DES MD5 take 30 days to know the key AES (Advanced Encryption Standard) SHA take 30*50 days to know the key • The DES & 3-DES have been broken before, the AES has not broken yet. Created by: Ahmed Nabil Access Control List (ACL) • Who can permit ( )عدىand who will be denied)(هدى • If I deny a certain IP, at the first, then permits it at the last, the router will deny it, as at the first the priority is higher than last. • If I didn’t mention IPs at ACL, by default the router will deny them, so its preferable to mention it even if you want to deny them to let the router get rid from them quickly. Organized by: Abdullah Ahmed Created by: Ahmed Nabil Access Control List (ACL) • There are types of ACL: IP ACL ARP ACL MAC ACL • The most used the IP ACL Organized by: Abdullah Ahmed Created by: Ahmed Nabil Access Control List (ACL) IP standard ACL • It filters data based on SRC IP only • Steps to configure ACL: 1. Create ACL 2. Activate ACL on interface Organized by: Abdullah Ahmed Created by: Ahmed Nabil Access Control List (ACL) IP standard ACL: 1st Create ACL: Numbered: (Config)# access-list 1-99 {permit/deny} SRC IP [wild card mask (W.C.M)] Ex: (config)# access-list 15 deny 192.168.1.2 0.0.0.0 (config)# access-list 15 permit 192.168.1.0 0.0.0.255 • Sequence is very important as the one ip only denied then permit the others Named: (config)# ip access-list standard named (config-std-nacl)# {permit/deny} SRC IP [W.C.M] nacl named ACL 2nd Activate ACL on interface: (config)#int s0 (config-if)# ip access-group no. or name {in/out} Organized by: Abdullah Ahmed Created by: Ahmed Nabil Access Control List (ACL) IP extended ACL: It filters the data based on (TCP/IP protocol – layer 4 (SRC IP & DST IP) – layer 7 (application name) & layer 3 (port no.) (optional)) Organized by: Abdullah Ahmed Created by: Ahmed Nabil Access Control List (ACL) Organized by: Abdullah Ahmed 1st Create ACL: Numbered: (Config)# access-list 100-199 {permit/deny} TCP/IP protocol SRC IP + w.c.m DST IP + w.c.m [= port no./app no. ] Named: (config)# ip access-list extended name (config-ex-nacl)# {permit/deny} TCP/IP Protocol SRC IP + w.c.m DST IP + w.c.m [= port no./App no.] Access Control List (ACL) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • ACL rules: ACL should contain at least 1 permit. If mask /26 = 255.255.255.192 W.C.M= 255-Subnet mask= 0.0.0.63 64 IPs If mask /26 = 255.255.255.252 W.C.M= 255-Subnet mask= 0.0.0.3 4 IPs Standard ACL should be placed as closed as possible to DST. Extended ACL should be placed as close as possible to src. Access Control List (ACL) Created by: Ahmed Nabil Organized by: Abdullah Ahmed We write (permit IP) not TCP because TCP can stop routing protocols like OSPF… so we write (permit IP) Created by: Ahmed Nabil LAN Switching • LAN switching Ethernet switching • Access switch like 2960 cisco. • Core switch like : 6513 cisco. Organized by: Abdullah Ahmed STP (Spanning-Tree Protocol) Created by: Ahmed Nabil Organized by: Abdullah Ahmed STP شجرة منتشرة االغصانIETF 802.1dDijkstra • STP working inside LAN @startup: Neighbor discovery (exchange of hello) 1- Hello flooding BPDU flooding Bridge PDU = L2 PDU = L2 frame = switch frame 2- Every 2 seconds the switch sends BPDU. Switch ID Accumulated path cost Port ID 3- The non-root switch will choose the best path to go to root switch, when every non-root choose its best path, the rest of paths will considered standby or backup. STP (Spanning-Tree Protocol) Created by: Ahmed Nabil Organized by: Abdullah Ahmed @ Electing Root switch: • Root switch having the least bridge ID (Switch ID) • L2 & less than L2 (DCE), the least ID is the best. • L3 & more than L3 (DTE), the highest is the best. STP priority 16 –bit 65,535 System MAC (6-byte) • Default priority 32,768 • Less than 32,768 you will win , & your switch will be root switch. • More than 32,768 you will loss , & your switch will be non-root switch. Configuration: - Core(config)# spanning-tree VLAN 1-4094 priority less than 32,768 Or - Core (config)# spanning-tree VLAN 1- 4094 root primary (This command assign to your switch the least switch ID to insure to be the root switch) - If you forget to put switch ID, the switch with the least system MAC will be the root, but make it manually to insure that the root is the core switch. STP (Spanning-Tree Protocol) Electing Root Port (RP) • It is the best port on non-root switch that can, reach the root switch. Choosing RP: CSP Least accumulated path cost based on BW. Least switch ID. Least port ID. Created by: Ahmed Nabil Organized by: Abdullah Ahmed STP (Spanning-Tree Protocol) Created by: Ahmed Nabil Organized by: Abdullah Ahmed Electing Designated Port (DP) • It is the best port on each link that can reach to the root switch, it has the least CSP. • If the two ports at the same switch choose the least port ID. • If the ports of two switches have the same cost, then choose the best based on the least switch priority, if the switch priority equal, then choose the switch with least system MAC. • The rest of ports after choosing the RP & DP, will be the Blocked Ports (BPs) • No. of BPS= no. of links-no. of switches +1 • For this figure shown: No. of BPs=2-2+1=1 STP (Spanning-Tree Protocol) • Switch features: Listening [Electing process(Root switch, RP, & DP)](remove layer 2 loops) Learning (MAC table) Forwarding (Microsegment) Listening process take 15sec(Led Amber) Learning process take 15sec(Led Amber) Then the data forwarded(Led green) The root switch sends BPDU every 2 sec #Show spanning-tree #debug spanning tree events (to see live events) Created by: Ahmed Nabil Organized by: Abdullah Ahmed STP (Spanning-Tree Protocol) • Direct change (cable failed) Created by: Ahmed Nabil Organized by: Abdullah Ahmed STP (Spanning-Tree Protocol) • Indirect change (Root switch failed) Created by: Ahmed Nabil Organized by: Abdullah Ahmed STP (Spanning-Tree Protocol) RSTP (Rapid Spanning Tree Protocol) RSTP has only three states They introduce alternate & backup ports for every RP & DP Direct change convergence time=0sec Created by: Ahmed Nabil Organized by: Abdullah Ahmed STP (Spanning-Tree Protocol) Created by: Ahmed Nabil Organized by: Abdullah Ahmed STP (Spanning-Tree Protocol) Created by: Ahmed Nabil Organized by: Abdullah Ahmed Port fast • Port fast applied on ports connected to end devices to let it operate fast when there is disconnection & reconnection, so it can jump to forward state immediately • Ports between switches take time until finishing the following process {Listening, Learning, & Forwarding} To apply port fast: (config)# interface range fa 1-24 (config-if-range)#spanning-tree port fast • By these 2*Commands the STP has been disabled, to let the connection of end devices with switch be fast without the {Listening, Learning, & Forwarding} processes • When you apply Port fast on a port of switch1 & another port of switch 2, & you want to connect them together, it results in looping between Switch 1 & switch 2 because the STP disabled at port fast • To avoid this case, write the command [(config-if-range)# spanning-tree BPDU gaurd], this commands will let the port if it receives BPDU. It will shutdown. VLAN (Virtual LAN) Created by: Ahmed Nabil Organized by: Abdullah Ahmed • VLAN IEEE 802.1q queen • It is dividing main LAN into sub-LANs (VLAN{1-4094}) • VAN ID = 12-bit [04095], 0& 4095 reserved , 10021005 reserved for the past (Token Ring/FDDI) • VLAN used for Ethernet [(11001)&(10064094)] • The frame gets out from switch with VLAN Tag, Ex: VLAN1, to let the frame go to the specific VLAN that related to it. • LAN is one broadcast domain • Each VLAN -> is one broadcast domain • Before VLANs, the broadcast was assigned to all the devices in the LAN, which causes congestion, but after VLAN, the broadcast become more limited, within VLAN only • We use VLANs, when there are 200 active devices at same time. • If the network contain 500 devices, but only 100 devices active, so no need for VLAN. Created by: Ahmed Nabil VLAN (Virtual LAN) Organized by: Abdullah Ahmed Created by: Ahmed Nabil VLAN (Virtual LAN) • By default all devices are at VLAN 1 • Ports connected between switch & device called access • Ports connected between switch & another switch called trunk Organized by: Abdullah Ahmed Created by: Ahmed Nabil VLAN (Virtual LAN) • Devices at VLAN 1 cannot talk to device at VLAN 2, isolated. • The Device at VLAN1 can talk to device at VLAN2 through unicast only, no broadcast. Organized by: Abdullah Ahmed Created by: Ahmed Nabil VLAN (Virtual LAN) • At this case no broadcast no flood only unicast due to the router. • No routing protocol used as the VLANs all connected at same router’s ports. • Each VLAN = subnet/network Organized by: Abdullah Ahmed VLAN (Virtual LAN) ROAS(Router On A Stick) Created by: Ahmed Nabil Organized by: Abdullah Ahmed VLAN (Virtual LAN) Created by: Ahmed Nabil Organized by: Abdullah Ahmed VLAN (Virtual LAN) Created by: Ahmed Nabil Organized by: Abdullah Ahmed VLAN (Virtual LAN) Created by: Ahmed Nabil Organized by: Abdullah Ahmed VLAN (Virtual LAN) Created by: Ahmed Nabil Organized by: Abdullah Ahmed VLAN (Virtual LAN) Created by: Ahmed Nabil Organized by: Abdullah Ahmed VLAN (Virtual LAN) Created by: Ahmed Nabil Organized by: Abdullah Ahmed Managing Remotely Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil MLS (Multilayer Switch) • MLSL2 &L3 Organized by: Abdullah Ahmed Created by: Ahmed Nabil Cloud Computing Organized by: Abdullah Ahmed • Basically it uses defined as a computer that can be used by two or more users at same time. • But nowadays we refer to cloud by the word (virtualization) Virtualization • It is dividing main device into sub-devices To save resources • It is merging many physical devices to act as one big virtual device To offer redundancy (server of g-mail in real it consist of the thousands of servers appear as one big server) To load sharing (Active/Active) Created by: Ahmed Nabil Cloud Computing Organized by: Abdullah Ahmed Cloud Services: • Hardware services (Devices) [IaaS] (Infrastructure as a Service) Cloud providers it’s an empty place ( )ارض فضاءput a large number of devices and rent it for the companies, like : Servers, routers, switches, cables, storage (sub hard disk)] It includes renting IT infrastructure using: Virtual Machines (VM) = Virtual-Server = Sub-Server, virtual storage, virtual switches, cables, & virtual routers. Cloud providers examples Dell-EMC, IBM, Amazon (largest data center in world), & Microsoft, Oracle, SAP, VMWare, & salesforce. • M/W service [Mid-ware] [PaaS] (Platform as a Service) It makes easy for developers to create applications & software, so mainly used for development, testing, delivering, & managing S/W apps. Its final target is writing S/W for computer systems using python, Java, & .NET,… to build S/W codes. These codes will then be loaded on the infrastructure of cloud provider. Created by: Ahmed Nabil Cloud Computing Organized by: Abdullah Ahmed S/W service [Applications] • Cloud providers can host S/W applications customer can mange maintenance upgrades & add security patches to the existing apps. • SaaS example is play store, app store, gaming, g-mail, office tools (Microsoft Office 365 & calendaring,…..) Virtualization Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Switch Virtualization [dividing (VLANs) & merging (STP types, VSS, Switch stack)] • Link Virtualization • Router Virtualization • Server Virtualization Created by: Ahmed Nabil Switch Virtualization Organized by: Abdullah Ahmed • Dividing switch into sub switches can be done using VLANs, other methods is not covered in our course. • Merging the activity of many physical switches can be done in many ways, but our course only covers per VLAN STP. • PVST will help achieving load sharing between many core switches. Created by: Ahmed Nabil Organized by: Abdullah Ahmed Switch Virtualization • STPv1= IEEE802.1done root switch for all VLANs • RSTP (Rapid STP) = 802.1w = STPv2 fast & one root for all VLANs • Cisco PVST (Per VLAN STP) multiple core switches (cisco only) Choosing root for group of VLANs, so many root switches can exist for load sharing purpose. • Cisco Rapid-PVST Fast & multiple core switches (Cisco only) • MST (Multiple STP) = STPv3 = IEEE 802.1S fast & multiple core switches (standard for all vendors not cisco only) • For Configuration of above STP types: (Config)# spanning-tree mode STP STPv1 (Config)# spanning-tree mode RSTP RSTP (Config)# spanning-tree mode PSTP Cisco PVST (Config)# spanning-tree mode rapid-PSTP Cisco Rapid-PVST (Config)# spanning-tree mode mst MST Switch Virtualization • Cisco PVST Core1 (config)# spanning-tree vlan 1-15 root primary Core1 (config)# spanning-tree vlan 16-30 secondary primary Core2 (config)# spanning-tree vlan 16-30 root primary Core2 (config)# spanning-tree vlan 1-15 secondary primary Created by: Ahmed Nabil Organized by: Abdullah Ahmed Redundancy between devices Created by: Ahmed Nabil Organized by: Abdullah Ahmed VSS (Virtual Switching System) • It is merging many physical core L3 switch to act as one big virtual core switch. • One master switch will control the operation, & all switches will forward. • Its working in Active/Hot-standby fashion • To build the logical switch, the two chassis must be linked together by multiple interfaces that have been configured, as a Virtual Switch Link (VSL) Redundancy between devices Created by: Ahmed Nabil Organized by: Abdullah Ahmed Switch Stacking (Stack wise) • It is merging many physical L2 access switches to act as one virtual stacked switch • Stacking reached to 9 switches, as one stacked switch • One switch as a stack master for management functions, and all other are called stack members • If the master switch failed, other member switches can take over the role, all others are slaves, for all switches they forward data MEC (Multi-chassis Ether Channel) Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Ethernet Channel (EC) (Link Aggregation) • Link aggregation for Ethernet only • It is grouping many physical ports to act as one logical port • The four ports called PO# (Port channel #) • EC Benefits: Logical grouping of many physical ports Increase BW (Load distribution) Link level redundancy Organized by: Abdullah Ahmed Created by: Ahmed Nabil Ethernet Channel (EC) (Link Aggregation) Organized by: Abdullah Ahmed • Logical grouping of many physical ports It can merge many physical ports (2-8) to act as one virtual big port Cisco PAGP (Port Aggregation Protocol) merge (2-8) links Or IEEE LACP (Link Aggregation Control Protocol) merge (8-16) 8 active & 8 standby, IEEE 802.3ad (Config)# interface range Gi 1-4 (Config-if-range)# channel-protocol {LACP/PAGP} Regarding LACP (Config-if-range)# channel group Po# mode {Active/Passive} Regarding PAGP (Config-if-range)# channel group Po# mode {desirable/auto} Created by: Ahmed Nabil Ethernet Channel (EC) (Link Aggregation) Increase BW (Load distribution) Show mac-address table MAC Port A Po1 B Po1 C Po1 D Po1 Show Ethernet channel summary PO1 Gi1 Gi2 Gi3 Gi4 Link level redundancy Organized by: Abdullah Ahmed Created by: Ahmed Nabil Ethernet Channel (EC) (Link Aggregation) • At data center they named the access switch with leaf • At data center they named root switch as spine • SAN (Storage Area Network): Consists of many of Hard disk (HD) • Link aggregation conditions: Applied on the physical ports that on the same VLAN configuration Same trunk configuration Same STP configuration Same duplex configuration (full or half) (half duplex at HUB, because it doesn’t has separated collision domain) Same speed (10M,100M,1G,10G,100G) Organized by: Abdullah Ahmed Created by: Ahmed Nabil Ethernet Channel (EC) (Link Aggregation) Organized by: Abdullah Ahmed • Aggregating links on L3 devices, the aggregation of many physical links, we will give to the Ethernet channel (the group) not for individual physical interfaces. On Router (config)# interface Gi0/0 (we can’t write range to configure all ports at the same time, because router has different ports) (config-if)#no ip address (config-if)#channel-protocol lacp (config-if)#channel-group 1 mode active (config)# interface Gi0/1 (config-if)#no ip address (config-if)#channel-protocol lacp (config-if)#channel-group 1 mode active (config)# interface port-channel 1 (config-if)# ip address IP mask Created by: Ahmed Nabil Inside Data Center • FHRP (First Hop Redundancy Protocol) Organized by: Abdullah Ahmed Inside Data Center Created by: Ahmed Nabil Organized by: Abdullah Ahmed • Cisco company has 16 routers for WAN as one virtual router • City-stars mall has 2 routers as one virtual router • FHRP (First Hop Redundancy Protocol) • HSRP (Hot Standby Router Redundancy Protocol) Cisco & free • VRRP (Virtual Router Redundancy Protocol) Standard (IETF & IANA) • GLBP (Gateway Load balancing Protocol) Enhancement HSRP (Active/Active ,Up to 4 routers) Created by: Ahmed Nabil HSRPv1(Hot Standby Router Protocol) Organized by: Abdullah Ahmed • It is used to merge many physical routers, to act as one big virtual router [showing one virtual MAC (given by HSRP protocol), one virtual IP (given by configuration) ] • (config)#int Gi0/0 • (Congif-if)# standby 1 ip 10.1.1.100 Group no. = virtual router no. 0-255 • (config-if)#standby 1 priority # more than 100 to let the standby be the active, & more than 100 because by default the priority set to be 100 • Out of convergence الشبكة واقعة Created by: Ahmed Nabil HSRPv1(Hot Standby Router Protocol) Organized by: Abdullah Ahmed @startup • Neighbor discovery: Each router send hello every 3 seconds using multicast 224.0.0.2 Only one active , one standby, & others will be listener If the priority didn’t set, the router which has the highest priority will be the active Active router will be responsible for everything @Change • If active router failed: wait hold time = dead time Standby new active Listener new standby By default if the active failed, & returned again to the network, by default it will be listener To let it active as before failing, write this command {(config-if)#standby # preempt} عمل انقالب فى الشبكة عشان يرجع ريس تانى Created by: Ahmed Nabil HSRPv1(Hot Standby Router Protocol) Organized by: Abdullah Ahmed • If WAN link on Active router failed The devices connected through Ethernet port of router, will not detect any down in WAN Link, as for these devices the handshaking is working normal, so the router is okay. Router should decrement its priority (object tracking), to let the standby be the active, & the listener be the standby. #show standby Created by: Ahmed Nabil HSRPv1(Hot Standby Router Protocol) (Config-if)# standby version 2 Main differences over version 1: Use multicast 224.0.0.102 Use virtual MAC 00000c9ffxxx Support 12bit group no. (0-4095) Can adjust hello & dead time using milliseconds Support for IPV6 Not compatible with HSRPv1 Organized by: Abdullah Ahmed Created by: Ahmed Nabil Server Virtualization Organized by: Abdullah Ahmed Created by: Ahmed Nabil Server Virtualization Organized by: Abdullah Ahmed Created by: Ahmed Nabil Server Virtualization Organized by: Abdullah Ahmed SDN (Software Defined Network) Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed Created by: Ahmed Nabil Organized by: Abdullah Ahmed