9.ppt

Post on 17-May-2015

565 views 2 download

Tags:

transcript

04/12/23 1

Networking and Telecommunications

9. TCP/IP

04/12/23 2

TCP/IP

Transmission Control Protocol/Internet Protocol

Developed 1978-1983 U. Cal at Berkeley A family of protocols #1 protocol used in Lans and Wans De-facto standard

04/12/23 3

Non proprietary Layered set of protocols (4 layers) OSI is a 7 layer model (similar) Each layer talks to layer above and below Can replace any layer with another

layer/protocol Uses encapsulation/de-encapsulation

04/12/23 4

Encapsulation / De-encapsulation

04/12/23 5

4 Layers

Application Data applications: ftp, telnet, ssh, email(smtp), web

browsing, x-windows, ping, finger, NOS, DNS, NFS

Transport TCP layer (or UDP) Break data into packets Add port number and seq number Reassemble at other end

04/12/23 6

Network IP layer Includes protocols like ICMP (ping), ARP, RARP Add ip address (source/destination)

Data Link/Physical Add source/destination ethernet address IEEE 802.3, IEEE 802.5, X.25, ATM

04/12/23 7

4 Layers of TCP / IP

04/12/23 8

04/12/23 9

UDP

User Datagram Protocol Sends only 1 packet of data, smaller header More efficient than TCP. No need to break data into packets and re-

assemble Useful for some applications (ping)

04/12/23 10

Port Numbers

Standard set of integer numbers assigned to applications

Port 23 is telnet, 80 is http, 25 is email/smtp Helps to identify which application sent the

data

04/12/23 11

Ethernet Address

48 bits (12 hex digits) Ex: 1A:00:05:BC:C2:5F Burnt into nic (hard coded - cant be easily

changed) Normally unique in the world

04/12/23 12

IP Address

32 bits (4 decimal numbers, 0-255 each) Ex: 165.230.99.70 Software configured (easily changed) Special ip addresses (broadcasting):

0.0.0.0 255.255.255.255

Normally unique in the world

04/12/23 13

Key Fields in Packet Headers

04/12/23 14

IP Packet TTL (time to live) Source ip address Destination ip address Header checksum, length Data

04/12/23 15

TCP Packet Source and Destination

Port number Sequence Number Checksum Data

04/12/23 16

Ethernet Packet Source/dest. ethernet address Frame check Data

04/12/23 17

Ethernet Packet

04/12/23 18

IP Packet

04/12/23 19

TCP Packet

04/12/23 20

Class of IP Address

Assigned central/local Class A - Other Networks

8bits for networks/24 bits for hosts Class B - large organizations/universities

16 bits for networks/16 bits for hosts (65k hosts)

Class C - small companies 24 bits for networks/8 bits for hosts

256 hosts, actually 254

04/12/23 21

Example: Rutgers University

2 class B ip addresses 165.230.x.x and

128.6.x.x Rutgers using

subnetting

Ex: 165.230.99.70 – clam 165.230 => rutgers.edu 99 => subnet in BSB 70 => the system on

the above subnet

04/12/23 22

0

(1 bit)

128 networks

(7 bits)

Over 16 million hosts (24 bits)

10

(2 bits)

16,382 networks (14 bits)

65,534 hosts (16 bits)

110 (3 bits) 2,097,150 networks (21 bits)

254 hosts

(8 bits)

Class A

Class B

Class C

Class ID Network ID Host ID

32 Bit IP Addresses - Classes

Clam (Class B) – 165.230.99.70

04/12/23 23

More Class Info

Special IP addresses 10.0.0.0 (private ip space) – Part of Class A 127.0.0.1 (loopback address for testing internal

nic) 255.255.255.255 – broadcast 0.0.0.0 – default route address

Who gets Class A address? Military, major ISPs and research firms (ATT, IBM,

GE) and others

04/12/23 24

And more….

Does rutgers really have two class B? 165.230.x.x = 10100101.11100110.x.x Note – first two bits are 10 thus class B! 128.6.x.x = 10000000.00000110.x.x Note – again, first two bits are 10 thus class B!

There is also a class D and E used for multicasting and experimentation

04/12/23 25

Internet

04/12/23 26

General Info

Largest wan, and user of tcp/ip (not every WAN is part of the Internet)

Today, millions of systems, all 7 continents. companies, Edu. sites, home users. micros (pc, mac), workstations (unix), mini, mainframes and even super computers.

04/12/23 27

04/12/23 28

Beginnings with the military (DARPA) and the Arpanet - 1970s. Bitnet, edu. network.

NSF (National Science Foundation) funding (government). Heavy use by research labs and universities.

Internet was an early collection of networks, most based on Unix and Vax/DEC systems.

04/12/23 29

Biggest WAN?

Biggest use of TCP/IP?

INTERNET!!

04/12/23 30

At rutgers: 3 connections to internet backbone in N.B., (via commodity internet: AT&T (35meg), Verizon (35meg), and I2 connection: Abilene (155meg))

The internet DOES NOT EQUAL the WWW (world wide web) The internet pre-dates www by many years.

04/12/23 31

Applications on the Internet: web browsers, email (smtp), use net news, telnet, ftp, gopher,etc... (web browsers and email - most used)

The internet is tcp/ip based, heavy use of unix servers (for web service, dns, etc..) and NT/2000/2003 servers

04/12/23 32

Key Terms

Internet vs. Intranet Web browsers (netscape, internet explorer), web

servers, web sites ISP - internet service providers PPP (point to point protocol) - tcp/ip access for

home users IMAP and POP - email protocols for home users Web cache servers - save money (ISP Costs),

speed users web, minimize traffic on internet

04/12/23 33

Problems

Explosive growth (sluggishness) Attribute the explosive growth to

Creation of web servers and browser software (clients). major change over gopher (just text based). www has text, colors, sounds, video, pictures, etc..

The availability of www browsers on pc and mac systems (not just unix boxes, as it was originally)

The development of SLIP/PPP allowing home users access to the web (and other tcp/ip applications) on the internet

More users and more bandwidth intensive applications

04/12/23 34

Problems

ip address space shrinking (future - IPv6) Only 32 bits (not 48 bits like ethernet address) 2**32 hosts (4.29X109)

4,290,000,000 hosts

04/12/23 35

Security

Firewalls - filtering based on ip# and port numbers. Stands between internet and internal

company network. Combination of hardware and

software, allow and disallow services. Controlling incoming and outgoing packets...can

block packets Based on ip# and port numbers (telnet, ftp, email,

dns, etc..) Attempts to keep the bad guys out...

04/12/23 36

Intranet

Firewall

EvilInternet !

04/12/23 37

04/12/23 38

Hardware Firewall

04/12/23 39

04/12/23 40

Evil Internet ?????

Hackers and Viruses and Spam, oh my!

04/12/23 41

Advanced TCP/IP Info

04/12/23 42

Voice Over IP

Instead of normal phone service (POTS/PBX) PBX vs. VoIP -

circuit vs. packet switching

Phones with ethernet jacks, plug into switches

Video over IP - video conferencing, distance learning

QOS - Quality of service, important for voice/video (not as important for data). Minimize delay (latency), packet loss, jitter. Priority on packets (field on ip

layer) Multiple queues on routers and

switches based on priority Rate limtting (data vs

voice/video)..limit bandwidth can be done at router

04/12/23 43

IP Address Space Conservation (IPv4)

Problem: Running out of ip address space Solutions:

ipv6 - 32bit --> 128bit ip address (2**32 vs. 2**128 hosts) IPv4=2**32=4,290,000,000 possible hosts (over 4 billion) IP address for hosts (pc, macs, printers, switches, telephones,

etc..) Companies typically only use 25-50% of ip address allocated

to them (efficiency issues) Over 6 billion people in the world IPv6=2**128=300,000,000,000,000,000,000,000,000,000,000,

000,000 hosts! Future...work in progress...

04/12/23 44

IP Address Space Conservation (IPv4)

Private Address Space (internal) RFC 1918

10.0.0.0/8 - 16,772,216 hosts 172.16.0.0/12 - 1,048,576 hosts (rutgers dorms for

example) 192.168.0.0/16 - 65,536 hosts

Internal, not routed on internet Unique within internal company (not unique in the

world) Often Needs a NAT server (firewall/router)

04/12/23 45

NAT - network address translator Special “black box” to be a NAT device, or some

hardware firewalls and routers can NAT used to route private address space on the internet

when needed Uses table to map private address space to a small

pool of normal ip addresses (which are routable). Drawbacks: not all apps work well with NAT (peer to

peer apps, like net meeting or napster, may have problems). Also slower access.

Positives: More secure (private), save ip address space

04/12/23 46

Thus private address space: Extends life of IPv4 Gives companies lots of internal ip addresses

(if you’re a small Class C company, you can still use the 10.0.0.0 private ip address space and have over 16 million hosts!)

Better security, these ip address not seen directly on the internet..harder for hackers to attack

Drawbacks: Need NAT device to work, shouldn’t be used with servers (email, web, etc.)

04/12/23 47

At Rutgers….

Public IP address space 165.230 or 128.6 Routable inside and outside the university Unique system per ip number Can be registered in DNS (normally done)

Coordinated Private IP address space 172.16 Routable inside the university. Nat’d to 165 space when leaving the

university Unique system per ip number Can be registered via internal DNS

Uncoordinated Private Ip address space 192.168 not routable inside or outside the university. Nat’d before router (usually at

firewall) Many systems on different subnets may use same IP Cannot be registered in dns

04/12/23 48

Vlan Virtual Lan

1 switch, multiple lans (subnets) multiple broadcast zones

Used often with switches Allows to segregate common clients/servers (similar to

a bridge) to cut down on traffic and broadcasts, better security, less traffic

Flexible network segregation

04/12/23 49

04/12/23 50

VPN-Virtual Private Network

Connect offsite to your companies internal network, appears you are on the companies internal network

Your offsite location is given an internal company ip number

Good for home access, traveling employees Need a VPN box at your company site Uses encryption and tunneling

04/12/23 51

Broadcast Address and Subnet Masks

04/12/23 52

Broadcast Address:

128.6.100.xx (100 is the lan/subnet in a class B ip address) 128.6.100.255 is the broadcast address for that

lan/subnet 255.255.255.255 generic broadcast address

04/12/23 53

Subnet Mask:

128.6.100.xx (100 is the lan/subnet in a class B ip address)

If 255.255.255.0 is the subnet mask for the above class B address Which means 24 bits used for network and 8 bits

for host (16 bits assigned centrally for network, 8 bits assigned locally for network/subnet = 24 bits)

Thus 2**8 -2 hosts = 256-2 = 254 hosts per subnet/lan

If class B, then 8 bits also for subnet (lans) = 254

04/12/23 54

Example:

But what if you wanted more then 254 subnets ? Assume Class B network: If 255.255.255.192 is the subnet mask (11111111.11111111.11111111.11000000)

26 bits for network (10 bits for subnet) and 6 bits for hosts # of hosts = 2**6 -2 = 64 -2 = 62 hosts per subnet/lan # of subnets = 2**10 -2 = 1022 subnets/lans

Subnet mask is needed for routing, to determine network portion of ip address (and number of lans/subnets and hosts on each lan/subnet)

04/12/23 55

Another Example:

But what if you wanted more then 254 hosts ? Assume Class B network: If 255.255.254.0 is the subnet mask (11111111.11111111.11111110.00000000)

23 bits for network (7 bits for subnet) and 9 bits for hosts # of hosts = 2**9 -2 = 512 -2 = 510 hosts per subnet # of subnets = 2**7 -2 = 126 subnets/lans

Subnet mask is needed for routing, to determine network portion of ip address (and number of lans/subnets and hosts on each lan/subnet)

04/12/23 56

THE END !