NETWORK PROGRAMMING DATA NETWORK 2 NETWORK TERMINOLOGY Practices

  • Slides: 25
Download presentation
NETWORK PROGRAMMING DATA NETWORK 2 – NETWORK TERMINOLOGY (Practices) Presenter: Do Duy Tan NSL

NETWORK PROGRAMMING DATA NETWORK 2 – NETWORK TERMINOLOGY (Practices) Presenter: Do Duy Tan NSL Lab – Mar 9 th 2012 2/26/2021 1

Outline Ping & Traceroute 2. Setting IP Address 3. NAT 1. 2/26/2021 2

Outline Ping & Traceroute 2. Setting IP Address 3. NAT 1. 2/26/2021 2

Ping and Traceroute All data sent over the internet is sent in packets. Ø

Ping and Traceroute All data sent over the internet is sent in packets. Ø Example: § send an email/file broken down into raw data and small packets go through Internet Connection computer extract and reassembled a file Ø Ping and Traceroute are two programs that can be used to send packets of information to remote computers for the purpose of retrieving information, useful for testing your internet connection Ø Windows >> Start buttonRun<enter commnad or cmd>OK Ø 2/26/2021 3

Ping can test the speed of your connection, "distance" to target, and whether or

Ping can test the speed of your connection, "distance" to target, and whether or not your connection is even up and running. Ø It tells you how long a packet of data takes to travel from your computer to a specified host, and back again(in this case, the packet is 32 bytes in size). Ø Command: ping <a host IP address> Ø Examples: § ping 127. 0. 0. 1 Ø § ping www. yahoo. com (translate name addresses to numbers - like 209. 166. 165. 174 or 64. 58. 76. 224 - DNS resolution) Ø 2/26/2021 4

UNDERSTANDING THE OUTPUT ◦ the full name of the host, the IP address of

UNDERSTANDING THE OUTPUT ◦ the full name of the host, the IP address of the host ◦ whether or not the host replied, with how many bytes (size of packet), round trip time (in milliseconds), and the TTL is how many routers the packet will go through before giving up trying to find the host � INTERPRETING THE RESULTS ◦ all 4 packets sent are received, then the connection is working fine ◦ Any lost packets may indicate slow connection problems ◦ no packets are received "Destination Host unreachable" or "Request Timed Out" � 2/26/2021 5

Traceroute ØTraceroute tracks the path that a packet takes from your computer to a

Traceroute ØTraceroute tracks the path that a packet takes from your computer to a destination address Øhow many times your packets are being rebroadcast by other servers until it gets to the final destination ØCommand: tracert <ip address or website address> ØExamples: tracert yahoo. com 2/26/2021 6

� UNDERSTANDING THE OUTPUT ◦ how many routers the packet will go through before

� UNDERSTANDING THE OUTPUT ◦ how many routers the packet will go through before giving up trying to find the host � INTERPRETING THE RESULTS ◦ Traceroutes allow to see the path your packets take over the Internet ◦ where there is a break in your connection ◦ diagnose problems with your Internet connection (on your computer, out on the network, or at the server) 2/26/2021 7

Useful Links for Ping/Traceroute � http: //network- tools. com/default. asp? prog=ping&host=www. google. com �

Useful Links for Ping/Traceroute � http: //network- tools. com/default. asp? prog=ping&host=www. google. com � http: //www. ipaddressguide. com/ 2/26/2021 8

Setting IP Address �IPv 4 (Internet Protocol) address is the 4 octets (32 -bit)

Setting IP Address �IPv 4 (Internet Protocol) address is the 4 octets (32 -bit) address used to identify your devices in network or Internet. �Each IP Octet can be the value between 0 and 255 �Examples are 192. 168. 8. 145, 10. 11. 3. 4, etc. 2/26/2021 9

Step by step Go to Start and click on Control Panel. 2) Double click

Step by step Go to Start and click on Control Panel. 2) Double click on Network Connections. 3) Right click correct Local Area Connection and click Properties. 4) Select Internet Protocol (TCP/IP). Click on Properties. 5) Manual IP Assigning or IP Assigned by DHCP server Note: IP address of your computer must be unique. 1) 2/26/2021 10

Manual IP Assigning � Default gateway is a router that can route the traffic

Manual IP Assigning � Default gateway is a router that can route the traffic to the other network or Internet. � DNS server is an application server that can translate URL to IP address. 2/26/2021 11

IP Assigned by DHCP server � If have DHCP server setup on router or

IP Assigned by DHCP server � If have DHCP server setup on router or DHCP server in network � Select Obtain an IP address automatically and Obtain DNS server address automatically. 2/26/2021 12

IP Logical Network Design � Task: set up a network (wired or wireless) at

IP Logical Network Design � Task: set up a network (wired or wireless) at home? � Here are 3 recommended IP ranges you can used in your network without conflict with the IP Address in Internet. ◦ (1) (2) (3) 10. 0 - 10. 255 172. 16. 0. 0 - 172. 31. 255 192. 168. 0. 0 - 192. 168. 255 � Netmask will decide how many IP addresses available to be used in your network. Example: 255. 0 for 254 addresses to be assigned. � Example 1: 5 computers and a router in my network. ◦ assign 10. 0. 0. 1 to the router ◦ 10. 0. 0. 2 – 10. 0. 0. 6 to other 5 computers ◦ Netmask is 255. 0 for this network (maximum 254 devices) ◦ Network address is 10. 0 ◦ broadcast address is 10. 0. 0. 255 2/26/2021 13

IP Logical Network Design � Example network ◦ ◦ ◦ assign 172. 16. 10.

IP Logical Network Design � Example network ◦ ◦ ◦ assign 172. 16. 10. 1 to the router 172. 16. 10. 2 – 172. 16. 10. 9 to other 8 computers 172. 16. 10 – 172. 16. 10. 11 to other 2 notebooks netmask 255. 0 (maximum 172. 16. 10. 1 – 172. 16. 10. 254) Network address is 172. 16. 10. 0 broadcast address is 172. 16. 10. 255 � Example network ◦ ◦ ◦ 2: 8 computers, 2 notebooks and a router in my 3: 8 computers, a router and a network printer in my assign 192. 168. 1. 1 to the router 192. 168. 1. 2 to the network printer 192. 168. 1. 3 – 192. 168. 1. 10 to other 8 computers netmask 255. 0 Network address is 192. 168. 1. 0 broadcast address is 192. 168. 1. 255 2/26/2021 14

Simple Way to Check IP Address in Microsoft Windows Click Start Run. 2) Type

Simple Way to Check IP Address in Microsoft Windows Click Start Run. 2) Type in cmd and click OK. 3) Type ipconfig and hit Enter 1) Note: Type ipconfig /all to check DNS server and physical MAC address details 2/26/2021 15

Useful Links for IP Address Settings � http: //www. learntosubnet. com/ � http: //www.

Useful Links for IP Address Settings � http: //www. learntosubnet. com/ � http: //www. subnetmask. info/ � http: //www. home-network-help. com/ 2/26/2021 16

NAT (IP Network Address Translation) Protocol � To help extend the life of the

NAT (IP Network Address Translation) Protocol � To help extend the life of the IPv 4 addressing scheme while the newer IPv 6 protocol is developed and deployed � One of the most important of these is IP Network Address Translation � allows a small number of public IP addresses to be shared by a large number of hosts using private addresses (private LAN vs. Public IP) � provides some security benefits by making hosts more difficult to address directly by foreign machines on the public Internet 2/26/2021 17

NAT � Share internet connection from 1 IP WAN to many users inside a

NAT � Share internet connection from 1 IP WAN to many users inside a LAN � Firewall, hide all IP inside private LAN � Flexibility in management IP WAN/ NAT Server Private LAN 2/26/2021 18

Static NAT �Used since # of LAN IP = # of NAT-IP �Simple conversion

Static NAT �Used since # of LAN IP = # of NAT-IP �Simple conversion between Source & Destination IP Addess �Without storing network connection status 2/26/2021 19

Dynamic NAT �Dynamic host IP check Dynamic NAT-Table NAT-IP to Internet � Store IP

Dynamic NAT �Dynamic host IP check Dynamic NAT-Table NAT-IP to Internet � Store IP information inside NAT Table �Limited number of NAT-IP for Private LAN users 2/26/2021 20

Masquerading NAT �Popular NAT (NPAT-Network Port Address Translation) using in router �Private IP LAN

Masquerading NAT �Popular NAT (NPAT-Network Port Address Translation) using in router �Private IP LAN NAT-Router masquerading NAT -IP 2/26/2021 21

NAT Software �Internet Connection Sharing (ICS): Windows NAT+DHCP since W 98 SE �Win. Gate:

NAT Software �Internet Connection Sharing (ICS): Windows NAT+DHCP since W 98 SE �Win. Gate: like ICS plus lots of control �iptables: the Linux packet filter and NAT (interface for Net. Filter) �IPFilter: Solaris, Net. BSD, Free. BSD, x. Mach. �PF (firewall): The Open. BSD Packet Filter. �Netfilter Linux packet filter framework 2/26/2021 22

How to Activate Internet Connection Sharing in Windows? �Only one internet connection �Computers or

How to Activate Internet Connection Sharing in Windows? �Only one internet connection �Computers or devices in home or office LAN 2/26/2021 23

Internet connection sharing for your computers at home using the Windows XP � Start

Internet connection sharing for your computers at home using the Windows XP � Start Control Panel Network Settings � Choose the LAN or local area network connection setting for Internet connection sharing. � Click on “Properties”, show the different connection properties to customize � Tab named “Advance”, link to “Internet connection sharing” � “Allow Other Network Users to Connect Through this Computer’s Internet Connection” to activate it. Then, OK or Apply. � Now, all computer of devices on home or office LAN can connect Internet from one computer already connected to the Internet 2/26/2021 24

Useful Links for NAT � http: //internetconnectionsharing. org/ � http: //www. vicomsoft. com/learning-center/network-address- translation/

Useful Links for NAT � http: //internetconnectionsharing. org/ � http: //www. vicomsoft. com/learning-center/network-address- translation/ � http: //windows. microsoft. com/en-US/windows-vista/Using. ICS-Internet-Connection-Sharing 2/26/2021 25