Professional Documents
Culture Documents
Basic Networking July 16, 2006: A Free Guide To Basic Networking Provided by Heidelberg It
Basic Networking July 16, 2006: A Free Guide To Basic Networking Provided by Heidelberg It
Jakob H. Heidelberg
v1.15
p. 1/13
Index
Index .................................................................................................................................................................................... 2 Intro ..................................................................................................................................................................................... 2 What is your address? ................................................................................................................................................. 2 All routes lead to Rome .............................................................................................................................................. 4 You do the math!............................................................................................................................................................ 4 More than just the working class........................................................................................................................... 5 How much room do we have here? ...................................................................................................................... 5 Justf orgetaboutcl D and E f now .......................................................................................................... 6 ass or You can t t ouch t s .................................................................................................................................................. 6 hi The special loopback range ...................................................................................................................................... 7 Please keep out, this is private! .............................................................................................................................. 7 Will you please translate? ......................................................................................................................................... 7 No hands on .................................................................................................................................................................. 8 Did you just say APIPA? ............................................................................................................................................. 8 M asquerade m asks ................................................................................................................................................... 9 Can I have you real name? ..................................................................................................................................... 10 Did you receive my package? ............................................................................................................................... 10 Any ports open? .......................................................................................................................................................... 11 Shooting down trouble ............................................................................................................................................ 12 Tips, tricks and links ................................................................................................................................................. 12 Feedback ......................................................................................................................................................................... 13
Jakob H. Heidelberg
v1.15
p. 2/13
Intro
This document is a beginners guide to basic networking - it will deal with the most common IP protocol these days, namely version 4. We will start of with the basics and work our way up f rom t here All operating system functionality and commands mentioned are based on Microsoft Windows similar functionality might be available on UNIX/Linux or whatever OS you prefer.
Jakob H. Heidelberg
v1.15
p. 3/13
Basic Networking July 16, 2006 timeout for each entry f W i or ndow s XP i onl a f m i es when this time has passed ts y ew nut the entry is flushed and needs to be re-established the next time the devices needs to communicate. An ARP cache could look like this ( com m and: ARP ato show ARP table): 192.168.0.1 00-0E-08-DA-55-34 192.168.0.6 00-0E-08-DA-56-21 192.168.0.9 00-0E-08-DA-65-03 So if this computer needs to send a package to 192.168.0.6 it will use the physical destination address of 00-0E-08-DA-56-21.To fush t entre cache use t l he i he ARP dcom m and. To get your local MAC addresses use t he GETMACcom m and ( i W ndow s XP/2003 onl . y) To get you local IP addresses (and MAC addresses)use t IPCONFIG /ALLcom m and. he M AC addressed can be spoof ( aked)on t advanced t oft NI propertes i Devi ed f he ab he C i n ce Manager this could be useful if 2 or more NI s share t sam e M AC ( act l seen t s C he Ive ualy hi even t hough i shoul tbe possi e) t dn bl .
Jakob H. Heidelberg
v1.15
p. 4/13
Basic Networking July 16, 2006 router is connected to the ISP (Internet Service Provider) w hi i connect t ot I s ch s ed o her SP around the world creating one big routable infrastructure better known as: The Internet .
Jakob H. Heidelberg
v1.15
p. 5/13
Basic Networking July 16, 2006 To pick an example, the leftmost 3 bits in all Class C address i sett s o 110t rem ai ng 29 he ni bits can each be eiher or ( t 0 1 represent by i t f l i ed x n he olow ng): 110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx If you try to convert the above to decimal values convertng each x t eiher or - you i o t 0 1 will end up with an address from 192.0.0.0 up to 223.255.255.255 which is exactly what we expected in the above table.
Jakob H. Heidelberg
v1.15
p. 6/13
Basic Networking July 16, 2006 Do not touch the range from 127.0.0.0 to 127.255.255.255 (we just lost 16+ million addresses) This range is for loopback test purposes see bel ow Do not touch the range from 0.0.0.0 to 0.255.255.255 (now we lost another 16+ million addresses) Thi range cannotbe used,si pl a w ast ofgood address space s m y e Do not touch the range from 255.0.0.0 to 255.255.255.255 (now we lost another 16+ million I s) P This is the broadcast range, in my opinion another good exam pl ofa w ast offne I s e e i P In the good old days, som e rout di tlke subnetzero addressing, meaning that the ers dn i subnet part of the IP could not be all zeros, but this is hopefully not relevant to you anymore so l l ets eave i t t here.
Jakob H. Heidelberg
v1.15
p. 7/13
Basic Networking July 16, 2006 Private IP addresses are not routed/send over the Internet, these address are not meant to be public in any way. So if your home computer has the IP of 192.168.1.2 you will not be able to access that computer by using the private IP over the Internet without using VPN or some other fancynetworking technology. M ostLAN ( s LocalArea Net orks)uses Pri e address ranges internally. w vat Private networks are closely connected to the NAT technology which makes these 3 address ranges possible, please see below.
No hands on
Dynamic Host Configuration Protocol (DHCP) lets a network administrator define a range ofI addresses t be easedt com put on t net ork for a specified period of time. DHCP P o l o er he w makes the life of a network administrator a lot easier than if he or she had to manually assign I addresses t t com put ( atc I s) P o he ers st i P . Along with the IP address the DHCP server can provide clients with: a. subnet mask b. default gateway c. WINS servers (used for local name resolution) d. DNS servers (used for local and external name resolution) There are more than 100 DHCP options available you can set up automatically for clients
Jakob H. Heidelberg
v1.15
p. 8/13
Here you will notice t t t hat he Alernat e Confguratont i m i ng because the IP i i ab s ssi has been statically assigned by an administrator. What this does is that if no DHCP service is found on the network, then the Alternate configuration will be used t s coul be om at pri e I address( PA)or a U ser hi d Aut ed vat P API configured configuration (a static IP assignment).
M asquerade m asks
Subnet masks are used by a network device to decide exactly what subnet it is on. The device needs to determine this to make a decision if it can reach the device by itself OR if it has to contact the Default gateway instead. 192.168.1.1 with a subnet mask of 255.255.255.0 or just 192.168.1.1/24 = 24 bits used for the network address itself 8 bits are left for hosts, making room for 254 actual hosts. In binary this it what we get: 11000000.10101000.00000001.00000001 = IP address 11111111.11111111.11111111.00000000 = subnet mask The net ork devi uses a so caled bi w ce l nary ANDng t l i hat ooks a bi lke t s t i hi 11000000.10101000.00000001.00000001 = IP address 11111111.11111111.11111111.00000000 = subnet mask -------------------------------------------------11000000.10101000.00000001.00000000 = subnet (= 192.168.1.x) From the above the network device knows what network it is on and if it needs to contact anther device 192.168.5.122 it will know the Default gateway will have to be contacted.
The mathematical rul w hen ANDng is: es i 1+1=1 1+0=0 0+1=0 0+0=0
By tweaking a bit with subnet masks we can divide our networks into smaller parts and even do the opposite thing called Super netting (most commonly used by routers/I s et to SP c. describe many small subnets in the shortest/most efficient way).
Jakob H. Heidelberg
v1.15
p. 10/13
Basic Networking July 16, 2006 broadcast on the local network and hope that somebody answers back WINS servers (NetBIOS names - centrally managed and maintained) DNS servers ( dom ai nam e or FQDN - centrally managed and maintained) n s
Today we are using DNS (Domain Name System) as the main name resolution service both within our corporate networks and when accessing the Internet. DNS is one of the main reasons why the Internet is so popular and easy to access. DNS servers are placed all around the world and they are constantly exchanging information about where different web servers, email-servers etc. are located around the entire world. DNS is a very efficient and (partly) dynamic system which is hierarchal structured and very easy to maintain. DNS translates names into IP address and sometimes even the other way around. DNS is m ore t j nam e resol i butIcan cover al t i t s begi hat ust uton, t l hat n hi nners gui t net orki de o w ng.
Jakob H. Heidelberg
v1.15
p. 11/13
The Internet
E www.webserver.com
B DNS
Next we would ping our gateway, the LAN interface of router D. If D is answering we could test routing functionality and ping the external IP of the router before pingng the webserver i E. If the webserver is responding we will test name resolution to see if that is the problem this is done by pinging the webserver by name (www.webserver.com). If the webserver is not responding by name our problem might be the DNS server or connection to the DNS server.
Jakob H. Heidelberg
v1.15
p. 12/13
Other links:
http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/ip.htm http://compnetworking.about.com/od/tcpiptutorials/a/ipaddrnotation.htm http://www.troutman.org/tech/linux_guides/subnet.html http://www.computerhope.com/jargon/i/ip.htm http://www.broadband-help.com/articles/networking/guide_part1/ http://www.broadband-help.com/articles/networking/guide_part2/
Feedback
I hope you enjoyed reading this article, feel free to send me feedback: info@heidelbergit.dk
HEIDELBERG IT www.heidelbergit.dk
OSI model: http://www.webopedia.com/quick_ref/OSI_Layers.asp Disable APIPA: http://www.petri.co.il/disable_apipa_in_windows_2000_xp_2003.htm iii TCP: http://en.wikipedia.org/wiki/Transmission_Control_Protocol iv UDP: http://en.wikipedia.org/wiki/User_Datagram_Protocol v TCP/UDP ports: http://www.iana.org/assignments/port-numbers
i ii
Jakob H. Heidelberg
v1.15
p. 13/13