Terminology and basic structures for lab 1 ©2012 Prof. José María Foces Morán
LAN : Local Area Network. 10 to 1000 m University campus. MAN : Metropolitan Area Network. 1 a 10 Km A city WAN : Wide Area Network. Más de 10 Km A province, a country ©2010 Prof. José María Foces Morán
Medios físicos de transmisión Twisted pair cables Inexpensive, entre 10 y 1000 Mbps (Mega bits per second) ▪ STP (Shielded Twisted Pair) ▪ UTP (Unshielded) ▪ Cat 3 (30 Mbps) ▪ Cat 5 (100 Mbps) ▪ Cat 6 (1 Gbps) ©2010 Prof. José María Foces Morán
Coaxial cables Single, inner conductor ▪ Thick (2Km max length, 20Mbps max. frequency) ▪ Thin (RG-58/U) Noise sensitive T Connector, BNC type Termination resistors ©2010 Prof. José María Foces Morán
Fiber optics Transmission of light ray in a light- transmitting material Immune to electromagnetic radiation In the order of Gbps, depending on grade Monomode Multimode Laser and LED drivers ©2010 Prof. José María Foces Morán
Network Interface Card (NIC) Provides access to a LAN By using a cable or optical fibers Connected to a computer by using a PCI-X bus Associated to a unique level-2 address ▪ MAC (Media Access Control address) o LLA ( Link Level Address ) ▪ A 48-bit number assigned by the IEEE ©2010 Prof. José María Foces Morán
Concentrator (HUB) Creates a unique collision and broadcast domain All nodes share the physical medium As though it were a single cable shared by all nodes Virtually not used today Operates at the physical level (OSI level 1) ©2010 Prof. José María Foces Morán
Conmutador (SWITCH) Supports several “ communications” at the same time Several two-node pairs may opt to the full bandwidth Most common case today These devices learn the MAC addresses of the nodes as they initiate communication Operates at the level 2 ©2010 Prof. José María Foces Morán
Switch, basic functions: MAC Address learning ▪ Keeps a table that associates port number and MAC: Content Addressable Memory Filtering Forwarding ©2010 Prof. José María Foces Morán
A switched LAN with two segments Uplink : A special port that aggregates traffic Higher bandwidth than the other ports ▪ 1000-BASE-T over CAT6 twisted-pair cables ▪ Gigabit Ethernet over MM (Multi Mode) fiber optics ©2010 Prof. José María Foces Morán
IP Router: Works at the internetwork level (OSI no. 3) PDU: Forwards IP packets Used to create internetworks Functions IP forwarding DHCP server NAT/PAT Firewall ©2010 Prof. José María Foces Morán
Each IP address is 32 bits in length Four bytes a.b.c.d: ▪ Decimal ▪ Hex 0x0 – 0xff Hierarchical, two parts: ▪ Network number ▪ Example/24: 24 bits ▪ Node number: ▪ 32 – 24 = 8 Two special cases ▪ Broadcast: ▪ Loopback: ©2010 Prof. José María Foces Morán
▪ IP address types: ▪ Classful A, B y C, etc. ▪ CLASSLESS CIDR/VLSM ▪ Private ranges For use within an organization ▪ Public For addressing in the general Internet ▪ We will explain how to calculate the network number, etc ©2010 Prof. José María Foces Morán
▪ Each node has two addresses: ▪ MAC (Its network interface card, NIC) ▪ IP address ▪ How are these addresses related? ▪ Address Resolution Protocol ▪ ARP keeps the relation between the two up-to-date ▪ Play with the arp –a command in your system ©2010 Prof. José María Foces Morán
Discover the network configuration of your system Operating system name IP address This system’s NICs MAC addresses The network mask Our access router (Default router) Arp table Name server ©2010 Prof. José María Foces Morán
Boot your system to Linux Login into your system: The instructor will provide user/passwd Request a shell (A terminal or command processor) Which system is this? Type the following command after the shell prompt: $ uname –a Linux llull #1 SMP Thu Aug 19 03:44:10 UTC 2010 i686 GNU/Linux The name of this node $ hostname llull ©2010 Prof. José María Foces Morán
The man command offers you the manual page of the indicated command: $ man uname Other Unix useful commands: $ ls –l $ pwd $ cat /etc/services $ more /etc/hosts $ exit $ netstat –a | grep SOCK | more ©2010 Prof. José María Foces Morán
Your system may have more than one installed $ man ifconfig $ ifconfig eth0 Link encap:Ethernet HWaddr 90:e6:ba:cd:96:d9 inet addr: Bcast: Mask: inet6 addr: fe80::92e6:baff:fecd:96d9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:498 errors:0 dropped:0 overruns:0 frame:0 TX packets:418 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:47523 (46.4 KiB) TX bytes:54582 (53.3 KiB) Interrupt:220 Base address:0x2000 What do the different fields mean? Consult the manual page, lookup the following fields: Link encap: Ethernet Hwaddr: inet addr: Bcast: Mask: ©2010 Prof. José María Foces Morán
$ netstat –a Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:nfs *:* LISTEN tcp 0 0 *:afpovertcp *:* LISTEN tcp 0 0 *:swat *:* LISTEN tcp 0 0 *:36938 *:* LISTEN tcp 0 0 *:sunrpc *:* LISTEN tcp 0 0 *:56501 *:* LISTEN tcp 0 0 localhost:ipp *:* LISTEN tcp 0 0 localhost:smtp *:* LISTEN tcp 0 0 *:59514 *:* LISTEN tcp 0 0 *:26 *:* LISTEN tcp 0 0 llull.local: :49699 ESTABLISHED tcp6 0 0 [::]:netbios-ssn [::]:* LISTEN tcp6 0 0 [::]:www [::]:* LISTEN ©2010 Prof. José María Foces Morán
Ejecutad este comando antes de continuar: $ PATH=$PATH:/usr/sbin:/sbin arp -v Address HWtype HWaddress Flags Mask Iface Time-Capsule-Augustus-A ether 00:24:36:a2:e4:50 C eth0 Entries: 1Skipped: 0Found: 1 arp -vn Address HWtype HWaddress Flags Mask Iface ether 00:24:36:a2:e4:50 C eth0 Entries: 1Skipped: 0Found: 1 ©2010 Prof. José María Foces Morán
$ man ping Packet Internet Groper test IP connectivity (OSI level 3) ping paloalto.unileon.es PING paloalto.unileon.es ( ) 56(84) bytes of data. 64 bytes from paloalto.unileon.es ( ): icmp_seq=1 ttl=255 time=0.266 ms 64 bytes from paloalto.unileon.es ( ): icmp_seq=2 ttl=255 time=0.121 ms ©2010 Prof. José María Foces Morán
llull:/home/chema# traceroute paloalto.unileon.es traceroute to paloalto.unileon.es ( ), 30 hops max, 40 byte packets 1 paloalto.unileon.es ( ) ms ms ms llull:/home/chema# traceroute traceroute to ( ), 30 hops max, 40 byte packets 1 Time-Capsule-Augustus-Aurelius.local ( ) ms ms ms 2 n unileon.es ( ) ms ms ms 3 n unileon.es ( ) ms ms ms 4 GE EB-Valladolid0.red.rediris.es ( ) ms ms ms 5 CAL.SO6-1-1.EB-IRIS4.red.rediris.es ( ) ms ms ms ©2010 Prof. José María Foces Morán
$ route –a route -v Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface * U eth0 default Time-Capsule-Au UG eth0 route -vn Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface U eth UG eth0 ©2010 Prof. José María Foces Morán
What’s the purpose of the following files? ( See $ man hosts for example) /etc/hosts /etc/services /etc/networks ©2010 Prof. José María Foces Morán
Determine the following network configuration parameters of your system: ① Your network access NIC’s MAC address ② Your local net’s default router ip address ③ Your NIC’s network mask ④ Which type if your IP address, A, B or C? ▪ Determine the first high order bits of the IP address ▪ Class A: MSb is a 0 ▪ Bit 31 is a 1 and bit 30 is a 0 ▪ Bit 31 is a 1, bit 30 is a 1 and bit 29 is a 0 ©2010 Prof. José María Foces Morán
Use your browser to access then, discover how this new connection appears in the output of the following command: $ netstat –a | more Which local and remote ports make up this connection? ©2010 Prof. José María Foces Morán
Required/recommended computing infrastructure for completing the CN Labs A standard Windows-XP or Windows-7 installation ▪ Test basic IP configuration commands ▪ Install OpNet Simulator, student version Ubuntu Linux ▪ Basic IP configuration, routing, DNS client ▪ Java Compiler and Runtime + IDE ▪ Wireshark Network Analyzer ©2010 Prof. José María Foces Morán