… and doesn’t Chris Taylor How the Internet Works … and doesn’t Chris Taylor
Agenda Compare snail communication vs. e-communication Talk with a few servers Trouble-shooting
Objectives Snail Communications E-Communications Send letter to Joe Fisherman in Salmon Bay, BC Browse the OPCUG web site
Address Lookup Snail Communications E-Communications Phone book Start with name (Joe Fisherman) Returns the address (1 Water Street, Salmon Bay, BC) Province – BC City – Salmon Bay Street – Water Street House number – 1 DNS (Domain Name System) Lookup name (opcug.ca) Returns the address (206.47.37.30) Network – 206.47.37 Host – 30
Envelope Snail Communications E-Communications Destination address 206.47.37.30 Network – 206.47.37 Host – 30 1 Water Street Salmon Bay BC
Return Address Snail Communications E-Communications 9 Main Street, Ottawa, ON Province – Ontario City – Ottawa Street – Main Street House – 9 My computer (222.111.222.111) Network – 222.111.222 Host – 111
Envelope Snail Communications E-Communications Destination address 206.47.37.30 Network – 206.47.37 Host – 30 Source address 222.111.222.111 Network – 222.111.222 Host - 111 9 Main Street Ottawa, ON 1 Water Street Salmon Bay BC
Who is it from / to Snail Communications E-Communications Add the person’s name to the “to” and “from” addresses To – Joe Fisherman From – Chris Taylor Add the “port” number to the destination and source IP addresses Source port randomly generated (23172) Destination ports well-known Web 80 / 443 SMTP 25 POP email 110 DNS 53 SMB over IP 445 NetBIOS 137-139
Ports OPCUG.CA
Ports OPCUG.CA Web server Mail server Pop 3 server Telnet server FTP server FTP server two
Ports Port 80 25 110 23 21 OPCUG.CA Web server Mail server Pop 3 server Telnet server FTP server FTP server two
Ports Port 80 25 110 23 21 OPCUG.CA Web server Mail server Pop 3 server Telnet server FTP server FTP server two Web browser: Connects to whatever is listening on port 80
Ports Port 80 25 110 23 21 OPCUG.CA Web server Mail server Pop 3 server Telnet server FTP server FTP server two Telnet client: Connects to whatever is listening on port 23
Ports Port 80 25 110 23 21 OPCUG.CA Web server Mail server Pop 3 server Telnet server FTP server FTP server two FTP client: Connects to whatever is listening on port 21
Ports Port 80 25 110 23 21 1121 OPCUG.CA Web server Mail server Pop 3 server Telnet server FTP server FTP server two FTP client: Connects to whatever is listening on port 21
Ports Port 80 25 110 23 21 1121 OPCUG.CA Web server Mail server Pop 3 server Telnet server FTP server FTP server two FTP client: Tell it to connects to whatever is listening on port 1121
Envelope Snail Communications E-Communications Destination address 206.47.37.30:80 Network – 206.47.37 Host – 30 Port 80 (web server) Source address 222.111.222.111:23172 Network – 222.111.222 Host – 111 Port 23172 Chris Taylor 9 Main Street Ottawa, ON Joe Fisherman 1 Water Street Salmon Bay BC
There … Destination address: 206.47.37.30 Destination port: 80 Source address: 222.111.222.111 Source port: 23172 Port 80 OPCUG.CA Web server
… and back Destination address: 206.47.37.30 Destination port: 80 Source address: 222.111.222.111 Source port: 23172 Port 80 OPCUG.CA Web server Destination address: 222.111.222.111 Destination port: 23172 Source address: 206.47.37.30 Source port: 80
How it gets there Snail communications
How it gets there Snail communications Mailman picks up envelope
How it gets there Does not know how to get it to BC Snail communications Mailman picks up envelope Does not know how to get it to BC
How it gets there Snail communications Mailman picks up envelope Does not know how to get it to BC Knows to deliver it to the Alta Vista postal terminal
How it gets there Snail communications Mailman picks up envelope Does not know how to get it to BC Knows to deliver it to the Alta Vista postal terminal Alta Vista terminal gets it on the plane to Vancouver
How it gets there Snail communications Mailman picks up envelope Does not know how to get it to BC Knows to deliver it to the Alta Vista postal terminal Alta Vista terminal gets it on the plane to Vancouver Vancouver postal station gets it on truck to Salmon Bay
How it gets there Salmon Bay puts it in bag for postal carrier “Jim” Snail communications Mailman picks up envelope Does not know how to get it to BC Knows to deliver it to the Alta Vista postal terminal Alta Vista terminal gets it on the plane to Vancouver Vancouver postal station gets it on truck to Salmon Bay Salmon Bay puts it in bag for postal carrier “Jim”
How it gets there Postal carrier “Jim” delivers it to 1 Water Street Snail communications Mailman picks up envelope Does not know how to get it to BC Knows to deliver it to the Alta Vista postal terminal Alta Vista terminal gets it on the plane to Vancouver Vancouver postal station gets it on truck to Salmon Bay Salmon Bay puts it in bag for postal carrier “Jim” Postal carrier “Jim” delivers it to 1 Water Street
How it gets there Someone at 1 Water Street gives it to Joe Fisherman Snail communications Mailman picks up envelope Does not know how to get it to BC Knows to deliver it to the Alta Vista postal terminal Alta Vista terminal gets it on the plane to Vancouver Vancouver postal station gets it on truck to Salmon Bay Salmon Bay puts it in bag for postal carrier “Jim” Postal carrier “Jim” delivers it to 1 Water Street Someone at 1 Water Street gives it to Joe Fisherman
How it gets there E- communications
How it gets there E- communications My computer looks at the destination IP address and sees that it is not on the same network
How it gets there Delivers the packet to the “default gateway” E- communications My computer looks at the destination IP address and sees that it is not on the same network Delivers the packet to the “default gateway”
How it gets there Default gateway delivers it to an upstream address E- communications My computer looks at the destination IP address and sees that it is not on the same network Delivers the packet to the “default gateway” Default gateway delivers it to an upstream address
How it gets there Upstream address may deliver higher upstream E- communications My computer looks at the destination IP address and sees that it is not on the same network Delivers the packet to the “default gateway” Default gateway delivers it to an upstream address Upstream address may deliver higher upstream
How it gets there E- communications My computer looks at the destination IP address and sees that it is not on the same network Delivers the packet to the “default gateway” Default gateway delivers it to an upstream address Upstream address may deliver higher upstream Eventually delivered to the destination network (206.47.37)
How it gets there Delivered to final host (206.47.37.30) E- communications My computer looks at the destination IP address and sees that it is not on the same network Delivers the packet to the “default gateway” Default gateway delivers it to an upstream address Upstream address may deliver higher upstream Eventually delivered to the destination network (206.47.37) Delivered to final host (206.47.37.30)
How it gets there E- communications My computer looks at the destination IP address and sees that it is not on the same network Delivers the packet to the “default gateway” Default gateway delivers it to an upstream address Upstream address may deliver higher upstream Eventually delivered to the destination network (206.47.37) Delivered to final host (206.47.37.30) Host delivers it to application listening on destination port (80 – web server)
How a reply gets back Snail Communications E-Communications Original return address contains all needed Name House number Street City Province Same steps take place in reverse Original source information contains all needed IP address Source port Same steps take place in reverse
Reply Destination address: 206.47.37.30 Destination port: 80 Source address: 222.111.222.111 Source port: 23172 Port 80 OPCUG.CA Web server Destination address: 222.111.222.111 Destination port: 23172 Source address: 206.47.37.30 Source port: 80
Putting it all together
Putting it all together DNS lookup opcug.ca (206.47.37.30)
Putting it all together DNS lookup opcug.ca (206.47.37.30) 206.47.37.30 is not local
Putting it all together DNS lookup opcug.ca (206.47.37.30) 206.47.37.30 is not local Packet goes to default gateway
Putting it all together DNS lookup opcug.ca (206.47.37.30) 206.47.37.30 is not local Packet goes to default gateway Gateway sends upstream
Putting it all together DNS lookup opcug.ca (206.47.37.30) 206.47.37.30 is not local Packet goes to default gateway Gateway sends upstream Continue until someone knows route to network 206.47.37
Putting it all together DNS lookup opcug.ca (206.47.37.30) 206.47.37.30 is not local Packet goes to default gateway Gateway sends upstream Continue until someone knows route to network 206.47.37 Route to host on network 206.47.37
Putting it all together DNS lookup opcug.ca (206.47.37.30) 206.47.37.30 is not local Packet goes to default gateway Gateway sends upstream Continue until someone knows route to network 206.47.37 Route to host on network 206.47.37 Web server (port 80) gets packet
Talking to a server Often conversations are very simple Or complex SMTP (email) POP 3 (email) FTP Or complex Web Flash animation Many binary format conversations
Talking to a mail server HELO opcug.ca MAIL FROM: <chris.taylor@opcug.ca> RCPT TO: <sam.spade@rogers.com> DATA Subject: Just saying “hi” Hello Bob Yours truly, Chris .
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a mail server
Talking to a web server GET /index.html HTTP/1.1
Talking to a web server GET /index.html HTTP/1.1 HTTP/1.0 401 Unauthorized - user not logged in Expires: Mon, 01 Jan 1970 00:00:00 GMT Last-Modified: Sat, 25 Apr 2009 19:16:56 GMT Content-Length: 150 Server: Wildcat/v6.3.452.8 X-Elapsed-Time: 14750 X-Powered-By: Wildcat.Net v6.3.452.8 Content-Type: text/html Date: Sat, 25 Apr 2009 19:16:56 GMT Set-Cookie: sessionid=6D3764DB; path=/ Set-Cookie: wcbbs=The PUB; path=/ WWW-Authenticate: basic realm="The PUB" <HTML><HEAD><TITLE>Unauthorized</TITLE></HEAD> <BODY><H1>Unauthorized</H1> Proper authorization is required to access this web site. </BODY></HTML>
Trouble-shooting
What to do when it doesn’t work!
Try another destination What this tells you If it works, your computer is fine What you can do to fix Probably nothing. The problem is at the other site
Try another destination
Try your ISP’s site What this tells you What you can do to fix If it works but other sites don’t, your ISPs route to the Internet may be down What you can do to fix Probably not a whole lot
Try another computer on your network What this tells you If it works from another computer, the problem is local to your computer What you can do to fix Complete shutdown (not reboot) and restart your computer Compare IP config to working computer Check / swap cables Change port on router
Try by IP address What this tells you What you can do to fix If it works but domain name doesn’t, the problem is likely with DNS What you can do to fix Check the properties of IP config Restart your router Try manually with NSLOOKUP to see if your DNS server is down Try another DNS (www.opendns.com)
Ping the gateway What this tells you What you can do to fix If you have local networking What you can do to fix Restart your router Ping other computers on your network
Check your ip address What this tells you What you can do to fix Start | Run | CMD ipconfig /all If address is 169.254.x.x (link-local or automatic private IP addressing) What you can do to fix Check if cable is disconnected Check if your router is working
Remove your router What this tells you What you can do to fix If it works without the router, the router may be faulty or config messed up What you can do to fix Restart router Reconfigure router Replace router Don’t run longer than you have to without router
Prepare Know your current configuration Know some ip addresses of well known servers Know ip addresses for OpenDNS Know what you can ping When restarting, always begin with device furthest away (modem, then router, then computer) Know your ISP’s instructions
Happy computing