例外(exception)とは何か
Download
Report
Transcript 例外(exception)とは何か
Lecture 8
Internetworking and IP Address
•
•
•
•
Motivation of Internetworking
Internet Architecture and Router
Internet TCP/IP Reference Model and Protocols
IP Addresses
- Binary and Dotted Decimal IP Address
- Classful IP Addressing
- Subnet and Classless IP Addressing
- Address/Subnet Mask
- Special Addresses
• Assigning IP Address to Host Computer
• Assigning IP Addresses to Router
Lecture 8
Motivation of Internetworking
Internetworking: networking technologies to connect multiple networks
Many networks exist: LANs and WANs (Ethernet, Token Ring, FDDI, WiFi, BT, …)
- No single networking technology suited for all needs
- Computers in one type of network can’t communicate with computer in another type
- Repeater, bridge and hub connect only the same type of networks
Universal service: Any pair of computers can communicate
Heterogeneity and incompatibility among different networks
-
Media and electronic properties
Signaling and data encoding
Packet formats
Addresses
Ethernet
Protocols
Goal of Internetworking
Token Ring
- Uniform
- Universal
- Hides network details/differences from user
SD AC FC DAdd SAdd
Payload
CRC ED FS
Up to 4550 bytes
Lecture 8
Internet Architecture
router
network
router
network
router
network
network
A host computer connects to a physical network
Internet building blocks:
- Router
*
*
*
*
*
*
A hardware device with two or more interfaces to connect networks
A dedicated device/computer with CPU, memory, I/O, OS, etc.
Installed multiple NICs and network protocol suits when connecting different networks
Forwards packets from one network to another
Transforms packets as necessary to meet standards for each network
Sometimes called gateway if it can translate among different application protocols
- Internet protocol suit
* A software operated on different network protocols
* A set of protocols, known as TCP/IP suite
* Needed for both host computers and routers
Internet Concept
- Create “virtual” network
- Universal addressing scheme
- Naming scheme
- Implement with protocol software
- All details of physical networks
hidden from users
Internet is a network of networks
that interconnects millions of
networks using routers and the
Internet protocol suite (TCP/IP).
No centralized governance!
Each network sets its own policies.
But must follow the name spaces,
- Internet Protocol address space
- Domain Name System (DNS)
Internet Connections
Internet
Connections
&
Packet Routing
Routers
Global
Internet
Connection
Visualization
http://en.wikipedia.org/wiki/Internet
Lecture 8
Internet TCP/IP Reference Model
Internet TCP/IP reference model
ISO 7-layer reference model
Layer 5: Application Layer
Corresponds to ISO model layers 5, 6 and 7; used for communication among applications
Layer 4: Transport Layer
Corresponds to layer 4/5 in ISO model; provides reliable delivery of data
Layer 3: Internet Layer (no such layer in ISO mode, extending network layer of ISO)
Defines uniform format of packets forwarded across networks of different technologies and
rules for forwarding packets in routers
Layer 2: Network Interface Layer
Corresponds to layer 2/3 in ISO model; defines formats for packets in hardware frame
Layer 1: Hardware Layer
Corresponds to layer 1 in ISO model; defines basic networking hardware
TCI/IP Protocols
Application
Application
Presentation FTP TEL SMTP DHCP DNS SNMP
NET
Session
Transport
TCP
Physical
Session Port
Address Number
H
Segment
UDP
Internet
Address
IGMP
IPv4/IPv6
ARP
Data link
Message
RTP
ICMP
InterNetwork
Message
H Address
Protocols defined by
the underlying networks
IP
Address
H
RARP
Datagram
Physical
Address
H
Frame
Bits
MAC
Address
Lecture 8
IP Address
IP Address (Internet Protocol Address
or Internet Address)
- Abstraction only understood by software
- Independent of hardware addressing
- Used by TCP/IP protocols and
other application programs
- 32-bit integer, or 4 bytes
- Does not identify a specific computer
- Identifies a connection between
a computer and a network
- Unique value for a host (global/local address)
- May have more than one IP addresses for a
device/computer, e.g., a router
- Classful IP addressing
- Classless IP addressing
- Assigned by global authority (IANA/ISP)
and local administrator
* IANA: Internet Assigned Number Authority
* ISP: Internet Service Providers
Lecture 8
Classful IP Addresses
IPv4 Addresses: 32 bits
class Prefix/Netid Suffix/Hostid
-
Initial bits determine class: A, B, C, D, E
Prefix identifies a network: Network ID number
Suffix identifies a host/router: Host ID number
Class determines boundary between prefix & suffix
Global authority assigns unique prefix to network
Local administrator assigns prefix &/ unique suffix
Lecture 8
Dotted Decimal Notation of IP Addresses
-
32 bit binary number is hard to remember
Divide 32 bits into four 8-bit sections called octet
Express each octet as a decimal number between 0 to 255
Separate 4 decimal number by dot “.”
Easy for human and used by application programs
More about IP address in Wikipedia
http://en.wikipedia.org/wiki/IP_address
Lecture 8
A Classful Addressing Example
Class B
Class A
Class B
Class C
Lecture 8
Subnet and Classless Addresses
-
Many IP addresses are wasted in classful addressing !!! class Prefix/Netid Suffix/Hostid
Example: 4 Labs each having 60 computers, 4 class C network ID needed, ¾ addresses wasted
Three fixed division boundaries between prefix (Netid) and suffix (Hostid) in classful addressing
Subnet addressing:
Netid
Subnetid Hostid
Classless addressing: arbitrary boundary
Class Inter-Domain Routing (CIDR) notation:
Network IP address / Bit number of Netid
Examples:
128.211.0.0/16 first 16 bits is network ID, corresponding class B
200.31.7.0/26 first 26 bits is network ID
200.31.7.1
…
200.31.7.60
Subnet-1
200.31.7.0/26
200.31.7.66
200.31.7.125
Subnet-2
Rest of the Internet
200.31.7.64/26
Router
200.31.7.130
Subnet-3
200.31.7.128/26
200.31.7.189
200.31.7.192/26
Site 200.31.7.0
Subnet-4
…
More about subnet address in Wikipedia
200.31.7.194 200.31.7.253
http://en.wikipedia.org/wiki/Subnet_address
Lecture 8
Address Mask and CIDR Host Address
Address mask or subnet mask:
- defines the boundary between network/subnet ID and host ID
- 32-bit binary number, e.g., 11111111 11111111 00000000 00000000 (NetID in first 16 bits)
- Bit mask makes computation efficient with “logic and”: A==D & M
Example: Host IP 200.31.7.130
11001000 00011111 00000111 10000010
26-bit subnet mask
11111111 11111111 11111111 11000000 &
Subnet ID 200.31.7.128 11001000 00011111 00000111 10000000
CIDR host addresses
- ISP assigns CIDR prefix
128.211.0.16/28
- 4 bits (16 addresses) for subnet
- Local administrator can assign
a 4-bit value to a host
- But leave two special addresses:
all 0s/0000 and all 1s/1111
1
Lecture 8
Special IP Addresses
-
Some addresses have special meanings
This computer address means the computer sends the packet with all-0s
Network address refers to the network and not to the host
Directed broadcast address for broadcasting in a specified network
Limited broadcasting address for broadcasting in local network attached
Loopback address for sending a packet back to a computer itself.
* The packet never leaves the computer
* The packet goes from one application to another in the same computer
* 127.x.y.z any address with head “127”, e.g., 127.1.2.3, 127.255.0.0
* 127.0.0.1 is often used in test programming
- All-1s and all-0s can not be assigned to any computer or router in a subnet !
Lecture 8
IP Addressing Principle for Router
-
Router connects to two or more physical networks
Each physical network has a unique prefix (Netid)
Router has multiple IP addresses, each for a connected network
Suffix in router IP address is assigned locally, like other host
Same suffix in routers’ IP addresses can help network administration
Check your PC’s
- Physical/MAC address
- IP addresses
- Subnet Mask
Using Command Prompt
ipconfig
ipconfig /all
Exercise 8
1. Describe similarities and differences between a network bridge and Internet router.
2. Describe similarities and differences between Internet reference model and ISO 7-layer model.
3. Identify the address class of the following IP addresses:
a. 200.58.20.165
b. 128.167.23.20
c. 127.54.118.21
d. 16.196.128.50
e. 193.34.121.255
f. 150.156.10.10
g. 230.10.24.96
Point out which are special addresses. If an address is a host/router IP address in
Class A, B or C, indicate its prefix (network ID) and suffix (host ID).
4. A small organization has a Class C address (196.125.56.0) for seven networks each with
24 hosts. Design an appropriate subnet addressing scheme (subnet addresses, host addresses
and mask) for the organization.
5. Draw a TCP/IP internet that consists of two networks connected by a router. Show two
computers attached to each network. Assign the IP addresses to the four computers and
one router with the assumption that network prefixes or IDs of the two networks are
170.61.192.0/18 and 210.37.136.32/29, respectively.