How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/[email protected].

19
How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/[email protected]. ad.jp

Transcript of How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/[email protected].

Page 1: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

How to connect to the Internet

1998/12/09

KEIO University, JAPANMikiyo Nishida/[email protected]

Page 2: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Overview of this section

• Internet connectable hardware/OS

• Why use the UNIX OS?

• Host connect to the network

• Server side configuring

Page 3: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Internet connectable hardware

• Hardwares– Workstation– PC (Personal Computer)– Set Top Box– Game machine and others– PDA

Page 4: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Internet connectable OS

• UNIX Family– FreeBSD– BSD/OS– Linux– SunOS

• Windows Family– Windows 95/98– Windows NT

Page 5: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Why use the UNIX OS?

• The Internet was developed on UNIX

• UNIX’s TCP/IP stack, and service daemons are more reliable than Windows

• but, Windows can connecting network easy

...GenerallyFront-end : Windows or UNIX

Back-end : UNIX

Page 6: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Host connect to the network

• Configuring Network Interface

• Configuring Routing Table

• Configuring Name Resolver

• Automatic network configuration

Page 7: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Configuring Network Interface

• Network Interface has global unique IP Address

• Host is belong to a network - Network Interface has netmask

Page 8: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Setting IP Address and Netmask

• Use command “ifconfig”

• “ifconfig” command attach/detach/modify NIC’s network information

– example:# ifconfig ed0 inet 192.168.1.2 netmask 255.255.255.0

Page 9: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

IP Address and Netmask

• IP Address is separated 2 parts– Host Address

• Indicate Host ID

– Network Address• Indicate Network ID host belong

• Netmask indicates Network Address part of IP Address

Page 10: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Special IP Address(1)

• Private IP Address– Not use for global Internet

10.0.0.0 - 10.255.255.255

172.16.0.0 - 172.16.255.255

192.168.0.0 - 192.168.255.255

• Localhost (indicate MYSELF)127.0.0.1

Page 11: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Special IP Address(2)

• Datalink Broadcast Address– All nodes in the same network segment

255.255.255.255

• Network Address– Host Address part’s all bit are 0

192.168.1.0 / netmask 255.255.255.0

• Network Broadcast Address– Host Address part’s all bit are 1

192.168.1.255 / netmask 255.255.255.0

Page 12: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Configuring Routing Table

• For the communication, Host must send packet to router

• Routing Table is used where send the packet.

Page 13: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Setting Route in Routing table

• Command “route” set/unset/change route in routing table

– example#route add 192.168.0.0 10.0.0.1

#route add default 192.168.1.2

Page 14: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Routing Table

• Routing table has mapped data route (Destination Network - Next Hop Router)

• “default route” is route for unknown destination network

• Generally, End-node (Host) set “default route” to border router

Page 15: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Configuring Name Resolver

• TCP/IP Stack must resolve the matching hostname and IP Address

• For resolving, TCP/IP stack queries DNS Server

Page 16: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Name Resolver Setting

• Name Resolving DNS Server is describing “/etc/resolv.conf”

• If use statically hostname and IP Address table, describe “/etc/hosts”

Page 17: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Example of Name Resolver Setting

• /etc/resolv.confDOMAIN sfc.wide.ad.jp

NAMESEREVR 202.217.0.99

SEARCH sfc.wide.ad.jp. wide.ad.jp.

• /etc/hostsmyhost 192.168.9.8

yourhost 10.0.0.1

Page 18: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Automatic Host Configuration

• DHCP - Dynamic Host Configuration Protocol– Automatically configure host setting

• IP Address

• Netmask

• DNS Server Address

• Default Route

Page 19: How to connect to the Internet 1998/12/09 KEIO University, JAPAN Mikiyo Nishida/west@sfc.wide.ad.jp.

Server side configuration

• DNS (bind) Entry

• Routing Daemon