SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler offline
Anycast 
 Communicate with “any” one of a set of nodes 
 Can do this with DNS 
$ dig www.google.com 
... 
;; ANSWER SECTION: 
www.google.com. 604799 IN CNAME www.l.google.com. 
www.l.google.com. 300 IN A 74.125.19.103 
www.l.google.com. 300 IN A 74.125.19.104 
www.l.google.com. 300 IN A 74.125.19.147 
www.l.google.com. 300 IN A 74.125.19.99
Anycast at IP layer 
 DNS allows anycast through name!address 
mappings 
 Sometimes we need it at layer 3 itself 
- Single IP address refers to multiple hosts 
- Need to talk to any one of them 
 Example: DNS root servers 
- Would like to scale number of root servers with Internet 
- Can’t use DNS (remember root servers hard-coded) 
- Want to query closest root server
Anycast in Forwarding Tablse 
 Remember, forwarding is longest-prefix-match 
 An anycast address is a /32 address 
 A single router may have multiple entries for the 
address 
 Anycast best used in services where separate 
packets might go to different destinations
The Cost 
 A /32 routing entry! 
 Multiple /32 routing entries!
Further Advantages 
 Geographic scoping 
 Distributed Denial of Service (DDoS) 
- Load from DDoS is distributed across many anycast nodes 
 F root server (192.5.5.241) now in 46 locations! 
Try the following: 
dig +norec @f.root-servers.net hostname.bind chaos txt
I think we have a problem 
- Projected use of /8 blocks 
- From “A Pragmatic Report on IPv4 Address 
Space Consumption,” Tony Main, Cisco Sys-tems.
IPv6 
 Work started in 1994 
 Basic protocol published in 1998 [RFC 2460] 
 Brief lull, the progress in 2003-6 
 Hard push within IETF today for adoption
IPv6 Key Features 
 128 bit addresses 
- Autoconfiguration 
 Simplifies basic packet format through extension 
headers 
- 40 byte “base” header 
- Make uncommonly used fields optional
IPv6 Addresses [RFC 4291] 
| n bits | 128-n bits | 
+-------------------------------+---------------------------------+ 
| subnet prefix | interface ID | 
+-------------------------------+---------------------------------+ 
 Written as 8, ‘:’-separated 16-bit hex numbers 
- Example: 2001:470:806d:1:0:0:0:9 
- Can omit a single run of 0s with “::” 
- Use brackets in URLs: http://[2001:470:806d:1::9]:80/ 
- Can write low 32-bits like IPv4: 64:ff9b::171.66.3.9 
 Like IPv4, specify subnet prefix with ’/’ 
- E.g., 2001:db8:122:344::/64 
 Most IPv6 networks use 64-bit subnet prefix, and 
end users should receive multiple /64s [RFC 6177]
IPv6 address allocation 
 Normal global unicast addresses start 2000::/3 
- IANA doles out unicast prefixes to RIRs 
 A few other special prefixes are assigned 
- :: (all 0s) is unspecified address, ::1 is localhost 
- Rest of 0::/8 used for IPv4 compatibility 
- fc00::/7 used for local addresses [RFC 4193] (kind of like 
IPv4 addresses 10/8, 172.16/20, 192.168/16 [RFC 1918]) 
- fe80::/10 used for link-local addresses 
- ff00::/8 used for multicast 
 Over 85% of address space reserved 
- In the unlikely event we exhaust 2000::/8, can be more 
parsimonious with some other slice
IPv6 multicast addresses 
| 8 | 4 | 4 | 112 bits | 
+------ -+----+----+---------------------------------------------+ 
|11111111|0RPT|scop| group ID | 
+--------+----+----+---------------------------------------------+ 
- T: 1 = transient, 0 = group ID assigned by IANA 
- P: 1 = address embeds global IPv6 prefix (T must also be 1) 
- R: 1 = (requires T = P = 1) encodes rendezvous point 
 Scope 1 = interface-local, 2 = link-local, . . . 
 Some groups assigned by IANA: 
- ff02::1 = all nodes, ff02::2 = routers, ff02::1:2 = DHCP 
- ff02::1:ffxx:yyyy - nodes w. unicast address . . . xx:yyyy 
 Send to Ethernet address 33:33:low-4-bytes-of-IP
Deriving interface IDs from Ethernet addrs 
 A 48-bit Ethernet MAC address looks like this: 
+----------------+----------------+----------------+ 
|cccccc0gcccccccc|ccccccccmmmmmmmm|mmmmmmmmmmmmmmmm| 
+----------------+----------------+----------------+ 
- c is manufacturer’s organizationally unique identifier 
- 0 identifies this as a globally unique address 
- g is 0 for unicast MAC addresses 
- m are address bits assigned by manufacturer 
 Convert MAC addr to 64-bit interface ID by 
flipping 0, sticking hex fffe in middle [RFC 4291]: 
+----------------+----------------+----------------+----------------+ 
|cccccc1gcccccccc|cccccccc11111111|11111110mmmmmmmm|mmmmmmmmmmmmmmmm| 
+----------------+----------------+----------------+----------------+
Interface IDs in IPv6 addresses 
 64-bit subnets allow use of derived interface IDs 
- Using Ethernet address reduces the need for DHCP 
- Manually assigned addresses (with global bit 0) won’t 
conflict with ones derived from Ethernet addresses 
- E.g., use interface ID 1 for default router, won’t conflict 
with any derived interface IDs 
 Link-local subnet fe80::/64 is important 
- Means you are guaranteed an address on every interface 
- Look on your machine. . . ifconfig will show IPv6 address 
- But can’t route to fe80::/64 without knowing interface
IPv6 API [RFC 3493] 
struct sockaddr_in6 { 
sa_family_t sin6_family; /* AF_INET6 */ 
in_port_t sin6_port; /* transport layer port # */ 
uint32_t sin6_flowinfo; /* IPv6 flow information */ 
struct in6_addr sin6_addr; /* IPv6 address */ 
uint32_t sin6_scope_id; /* set of interfaces for a scope */ 
}; 
 sin6 scope id specifies interface 
- New library calls if nametoindex, etc., to get values 
 In address conversion, specify interface w. ‘%’ 
- E.g., ping6 fe80::230:48ff:fe8e:d7a0%eth0
IPv6 Header [RFC 2460] 
Ver Class Flow 
Length Next Hdr. Hop limit 
Source 
(16 octets, 128 bits) 
Destination 
(16 octets, 128 bits)
IPv6 Header Fields 
 Version, 4 bits: 6 for IPv6 
 Class: 8 bits: like TOS in IPv4 
 Flow, 20 bits: identifies a flow [RFC 6437], but not 
really used yet 
 Length, 16 bits: datagram length 
 Next header, 8 bits: more later 
 Hop limit, 8 bits: like TTL in IPv4 
- Certain packets (e.g., redirect) must have Hop limit 255 
- Ensures will be ignored if not from local net 
 Addresses: 128 bits each
Autoconfiguration [RFC 4862] 
 radvd advertises prefixes with ICMP [RFC 4861] 
- Program run by one or more routers on link 
- Lets clients be configured without running DHCP 
- But ICMP message also has bit to say DHCPv6 available 
 ICMP contains prefixes + per-prefix info: 
 Valid lifetime and preferred lifetime 
- Longer valid than preferred lets address become deprecated 
 Autonomous config bit 
- 1 means receiving kernel immediately assigns address 
based on prefix and derived interface ID 
 On-link bit – says whole prefix reachable on link
Prefixes vs. links 
 In IPv4, address/prefix says what’s on link 
- E.g., Your address is 192.168.1.101/24 
- Sending to 192.168.1.102? Use ARP to get link-level address 
- Sending to 192.168.2.102? Send to router 
 IPv6 decouples address from what’s on-link 
- E.g., can reach on-link prefixes without address in prefix 
- Can advertise prefix for autoconfig, but not on-link 
- ICMP redirects can tell you about more on-link nodes
Neighbor discovery [RFC 4861] 
 Recall IPv4 uses ARP to get Ethernet from IP addr 
 IPv6 doesn’t need a non-IP protocol like ARP 
 If address is known on-link, use ICMP 
- Recall multicast address ff02::1:ffxx:yyzz (solicited node 
address) goes to all nodes with addresses ending . . . xx:yyzz 
- Hence they listen to link-layer address 33:33:ff:xx:yy:zz 
- Multiple addrs, same interface ID? Just one 33:33: addr 
- Also learn of neighbors from their traffic 
 Nodes aggressively time out valid neighbor info 
- If prefix not on-link, send to router again 
- Router can always send you a redirect
Extension Headers 
 Two types: destination and hop-by-hop 
 Both have a next header byte 
 Destination headers: intended for IP endpoint 
- Fragment header, Routing header (loose source routing) 
- Destination options 
 Hop-by-hop options header (type 0) 
- Must be first extension header in packet 
- Contains series of options for processing at each forwarder 
- Unknown options handled depending on top two bits of 
8-bit option type (ignore, drop packet, send ICMP) 
- 3rd bit says if option can change in transit
Example Next Header Values 
 Assigned from same space as protocol numbers 
 0: Hop-by-hop options header 
 4: IPv4 
 6: TCP 
 17: UDP 
 41: IPv6 
 43: Routing header 
 44: Fragmentation header 
 58: ICMPv6 
 60: Destination options
MTU Requirement 
 IPv4 requires a 576-byte link MTU 
 IPv6 requires 1280-byte MTU 
 If link MTU is smaller, then it MUST support 
sub-IP fragmentation and assembly to provide a 
1280-byte MTU 
 It SHOULD provide a 1500-byte MTU; nodes 
MUST receive 1500 byte packets
Fragmentation Revisited 
 High-loss links (e.g., wireless) can be a problem 
 10-hop route, each link has a 10% drop rate (90% 
success rate) 
- Probability one fragment arrives is 0:910  35% 
- Each fragment is transmitted 
1 + 0:9 + 0:92 + 0:93:::0:99  6:5 times along the route 
- 100% chance on first hop, 90% on second hop, 81% on third 
hop, etc.
Fragmentation Revisited, Continued 
 If a packet has four fragments, delivery 
probability is 0:354  1:4% 
 Total transmissions/delivery = 1 
0:014  
P9i 
=0 0:9i 
 Total transmissions/delivery = 65  6:5 = 423 
 Fragmentation header in IPv6 is a destination 
header 
- Fragmentation is possible, but must be done at the source
Link-layer reliability 
 High-loss link layers usually have single-hop acks 
and retransmissions 
- End-to-end argument: when can layer 2 reliability fail 
end-to-end? 
 10-hop route, each link has a 10% drop rate 
- Expect 1 
0:9  1:1 transmissions/link 
- 10 links, 11 transmissions 
- 44 transmissions/delivery
v4 API Interoperability 
 How to make code work w. IPv4 and IPv6? 
 Client side relatively simple 
- getaddrinfo can return IPv6 or IPv4 address [RFC 3493] 
- AI ADDRCONFIG flag says only return addresses in family n 
if some interface has non-link-local address of family n 
- Just create socket of right type when connecting 
 Or use IPv4-mapped IPv6 addresses [RFC 4038] 
+--------------------------------------+--------------------------+ 
|0000..............................0000|FFFF| IPv4 address | 
+--------------------------------------+----+---------------------+ 
- getaddrinfo returns (w. AI V4MAPPED),  works for servers 
- Disabled by IPV6 V6ONLY socket option
Tunneling IPv6 over IPv4 
 How to join IPv6 given IPv4 connection? 
 Idea: Tunnel IPv6 inside IPv4 packets [RFC 4213] 
- IP protocol 41 is IPv6–lets you put IPv6 packet as payload 
of IPv4 (or IPv6) packet 
- Known as Simple Internet Transition or sit tunnels 
IPv4 Header 
IPv6 Packet IPv6 Packet
Tunneling IPv6 over IPv4 
 Can get account from a tunnel broker [RFC 3053] 
- Multiple free options available, e.g.: 
 Easy to setup 
- Run radvd on one machine 
- Most machines support IPv6, will start using it when they 
get route advertisement ICMPs 
- Instant benefit for reaching machines behind NAT w. v4
How can an ISP deploy IPv6? 
 Already invested in expensive IPv4 infrastructure 
- Too expensive to replace core routers (even if they claim to 
support v6, might be too slow or buggy) 
 What if ISP controls Customer Edge (CE) routers? 
- Often embedded linux boxes using software routing, so can 
just upgrade the software 
 6rd (rapid deployment) provides IPv6 on IPv4 
infrastructure [RFC 5569][RFC 5969] 
- ISP Free offered 1.5M customers IPv6 in 5 weeks using 6rd 
- Changed CE software, installed border relays (BRs), but left 
their expensive v4 infrastructure untouched
How 6rd works 
 Embed customer’s IPv4 address in IPv6 address 
| n bits | o bits | m bits | 128-n-o-m bits | 
+---------------+--------------+-----------+------------------------+ 
| 6rd prefix | IPv4 address | subnet ID | interface ID | 
+---------------+--------------+-----------+------------------------+ 
|--- 6rd delegated prefix ---| 
- 6rd prefix is globally routable prefix belonging to ISP 
- E.g., 32-bit prefix + 0-bit subnet ID = 1 /64 per customer 
 CE routers statelessly translate v6$v4 
- Embed full IPv6 packet in a v4 packet, using sit 
- Send sit packet to nearest BR using IPv6 anycast (e.g., might 
use address in 192.88.99.0/24 [RFC 3068]) 
 BRs determine incoming sit IPv4 from IPv6 dest
6rd and [RFC 1918] private addresses 
 What if ISP has more customers than IPv4 addrs? 
 E.g., say multiple domains all re-use 10.0.0.0/8 
- Then don’t need first octet of IPv4 
 Configure CE with IPv4MaskLen 
- Number of bits that get stripped off IPv4 address when 
embedded in IPv6 
- Use extra bits to encode address domain in v6 address 
 DHCP option 212 lets CE routers learn parameters
Regional Internet Registries (RIRs)
IPv4 Status 
 IANA is already out of IP addresses
A Market in Addresses? 
 A market won’t solve the problem, though 
 IPv4 addresses can’t be legally owned in some 
regions 
 Trading will further fragment the address space
6lowpan and the Internet of Things
Internet of Things 
 Increasing connectivity: wireless controllers, light 
switches, etc. 
 Home area networks, personal area networks 
 Today: vertically integrated, separate technologies 
 Goal: connect them with IP 
 Imagine every light has an IP address. . .
6lowpan 
 IETF working group on IPv6 for low-power 
personal area networks (PANs) 
 Tiny, energy constrained, wireless devices: smart 
homes, ubiquitous computing 
 Link layers have tiny MTUs: (802.15.4 is 127 bytes) 
 [RFC 4944]
6lowpan Header Compression 
 6lowpan tries to compress common cases: TCP, 
UDP, etc. 
 Example: address compression 
- 6lowpan must allow full 128-bit addresses 
- Address fields alone are 32 bytes! 
- But often they can be shortened. . .
6lowpan Header Compression 
 [RFC 6282] 
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 
| 0 | 1 | 1 | TF |NH | HLIM |CID|SAC| SAM | M |DAC| DAM | 
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
6lowpan Compression Flags 
 SAC: Source address (stateful?) 
 DAC: Destination address (stateful?) 
 SAM/DAM: compression scheme used, for 
stateless: 
- 00: Full 128 bit address 
- 01: 64-bit address, other 64 are link-local prefix padded 
with zeros 
- 10: 16-bit address, other 112 are as above 
- 00: 0-bit address, 64-bit link local prefix + 64-bit link layer 
address
Multicast 
 Problem: want to send a packet to many nodes 
- Examples: IP-TV, large audio stream 
 Using n unicast packets means the same packet 
can traverse a single link many times 
a 
a 
src Internet gw a 
a 
a
Multicast Approach 
 Nodes can join a multicast group 
 Denoted by a multicast IP address 
 Routers build a routing topology 
- Link state vs. distance vector 
 IGMP: Internet Group Management Protocol 
- Protocol for hosts to manage membership in multicast 
groups 
- Hosts talk to local multicast routers
Example: Link State Tree 
 Routers exchange link state 
 Node advertise presence in group 
 Routers compute shortest-path multicast tree 
 Very expensive!
Network Topology 
R1 R2 
R3 R4 
R6 
R5 
R7 
A 
B 
C
Tree for A as Multicast Source 
R1 R2 
R3 R4 
R6 
R5 
R7 
A 
B 
C
Tree for B as Multicast Source 
R1 R2 
R3 R4 
R6 
R5 
R7 
A 
B 
C
Practical considerations 
 Multicast protocols end up being very complex 
 Introduce a lot of router state 
 Turned off on most routers 
 Used within a domain, not between domains 
 How does one handle congestion control?

Mais conteúdo relacionado

Mais procurados

Ipv6 1-091110143246-phpapp01
Ipv6 1-091110143246-phpapp01Ipv6 1-091110143246-phpapp01
Ipv6 1-091110143246-phpapp01
Rimba Ari
 
IPv6 technical introduction
IPv6 technical introductionIPv6 technical introduction
IPv6 technical introduction
Rayed Alrashed
 

Mais procurados (20)

IPv6 header
IPv6 headerIPv6 header
IPv6 header
 
IPv6 - Neighbour Discovery
IPv6 - Neighbour DiscoveryIPv6 - Neighbour Discovery
IPv6 - Neighbour Discovery
 
Ipv6 1-091110143246-phpapp01
Ipv6 1-091110143246-phpapp01Ipv6 1-091110143246-phpapp01
Ipv6 1-091110143246-phpapp01
 
NAT Ccna
NAT CcnaNAT Ccna
NAT Ccna
 
Neighbor Discovery Deep Dive – IPv6-Networking-Referat
Neighbor Discovery Deep Dive – IPv6-Networking-ReferatNeighbor Discovery Deep Dive – IPv6-Networking-Referat
Neighbor Discovery Deep Dive – IPv6-Networking-Referat
 
How to configure static nat on cisco routers
How to configure static nat on cisco routersHow to configure static nat on cisco routers
How to configure static nat on cisco routers
 
01 Ipv6 Addressing
01 Ipv6 Addressing01 Ipv6 Addressing
01 Ipv6 Addressing
 
NAT (network address translation) & PAT (port address translation)
NAT (network address translation) & PAT (port address translation)NAT (network address translation) & PAT (port address translation)
NAT (network address translation) & PAT (port address translation)
 
IPV6 Addressing
IPV6 Addressing IPV6 Addressing
IPV6 Addressing
 
IPv6 technical introduction
IPv6 technical introductionIPv6 technical introduction
IPv6 technical introduction
 
IPv6 Best Practice
IPv6 Best PracticeIPv6 Best Practice
IPv6 Best Practice
 
IPv6 Fundamentals
IPv6 FundamentalsIPv6 Fundamentals
IPv6 Fundamentals
 
Chapter10ccna
Chapter10ccnaChapter10ccna
Chapter10ccna
 
Chapter4ccna
Chapter4ccnaChapter4ccna
Chapter4ccna
 
APNIC Hackathon IPv4 & IPv6 security & threat comparisons
APNIC Hackathon IPv4 & IPv6 security & threat comparisonsAPNIC Hackathon IPv4 & IPv6 security & threat comparisons
APNIC Hackathon IPv4 & IPv6 security & threat comparisons
 
NAT Scneario
NAT ScnearioNAT Scneario
NAT Scneario
 
CCNA 200-120 Exam Quick Notes
CCNA 200-120 Exam Quick NotesCCNA 200-120 Exam Quick Notes
CCNA 200-120 Exam Quick Notes
 
Chapter 25. implementing i pv6 routing
Chapter 25. implementing i pv6 routingChapter 25. implementing i pv6 routing
Chapter 25. implementing i pv6 routing
 
I pv6 for cmu
I pv6 for cmuI pv6 for cmu
I pv6 for cmu
 
CCNA Dec, 2015 Questions
CCNA Dec, 2015 QuestionsCCNA Dec, 2015 Questions
CCNA Dec, 2015 Questions
 

Semelhante a Computer network (17)

Computer network (12)
Computer network (12)Computer network (12)
Computer network (12)
NYversity
 
10 IP VERSION SIX (6) WEEK TEN notes.pptx
10 IP VERSION SIX (6)  WEEK TEN notes.pptx10 IP VERSION SIX (6)  WEEK TEN notes.pptx
10 IP VERSION SIX (6) WEEK TEN notes.pptx
JoshuaAnnan5
 

Semelhante a Computer network (17) (20)

Ippptspk 3
Ippptspk 3Ippptspk 3
Ippptspk 3
 
Apnic-Training-IPv6_workshop
Apnic-Training-IPv6_workshopApnic-Training-IPv6_workshop
Apnic-Training-IPv6_workshop
 
ipv6_cheat_sheet.pdf
ipv6_cheat_sheet.pdfipv6_cheat_sheet.pdf
ipv6_cheat_sheet.pdf
 
IPv6 Community Event: IPv6 Protocol Architecture
IPv6 Community Event: IPv6 Protocol ArchitectureIPv6 Community Event: IPv6 Protocol Architecture
IPv6 Community Event: IPv6 Protocol Architecture
 
Computer network (12)
Computer network (12)Computer network (12)
Computer network (12)
 
IPv6
IPv6IPv6
IPv6
 
Chapter6
Chapter6Chapter6
Chapter6
 
C14-TCPIP.ppt
C14-TCPIP.pptC14-TCPIP.ppt
C14-TCPIP.ppt
 
Routing of netwok protocls and how .pptx
Routing of netwok protocls and how .pptxRouting of netwok protocls and how .pptx
Routing of netwok protocls and how .pptx
 
Ipv6up
Ipv6upIpv6up
Ipv6up
 
Network Layer And I Pv6
Network Layer And I Pv6Network Layer And I Pv6
Network Layer And I Pv6
 
SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...
SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...
SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...
 
Networking
NetworkingNetworking
Networking
 
Internet Protocol version 6
Internet Protocol version 6Internet Protocol version 6
Internet Protocol version 6
 
UNIT-2.pptx
UNIT-2.pptxUNIT-2.pptx
UNIT-2.pptx
 
Networking essentials lect2
Networking essentials lect2Networking essentials lect2
Networking essentials lect2
 
Training Day Slides
Training Day SlidesTraining Day Slides
Training Day Slides
 
tcpip.ppt
tcpip.ppttcpip.ppt
tcpip.ppt
 
16.) layer 3 (basic tcp ip routing)
16.) layer 3 (basic tcp ip routing)16.) layer 3 (basic tcp ip routing)
16.) layer 3 (basic tcp ip routing)
 
10 IP VERSION SIX (6) WEEK TEN notes.pptx
10 IP VERSION SIX (6)  WEEK TEN notes.pptx10 IP VERSION SIX (6)  WEEK TEN notes.pptx
10 IP VERSION SIX (6) WEEK TEN notes.pptx
 

Mais de NYversity

Programming methodology-1.1
Programming methodology-1.1Programming methodology-1.1
Programming methodology-1.1
NYversity
 
3016 all-2007-dist
3016 all-2007-dist3016 all-2007-dist
3016 all-2007-dist
NYversity
 
Programming methodology lecture28
Programming methodology lecture28Programming methodology lecture28
Programming methodology lecture28
NYversity
 
Programming methodology lecture27
Programming methodology lecture27Programming methodology lecture27
Programming methodology lecture27
NYversity
 
Programming methodology lecture26
Programming methodology lecture26Programming methodology lecture26
Programming methodology lecture26
NYversity
 
Programming methodology lecture25
Programming methodology lecture25Programming methodology lecture25
Programming methodology lecture25
NYversity
 
Programming methodology lecture24
Programming methodology lecture24Programming methodology lecture24
Programming methodology lecture24
NYversity
 
Programming methodology lecture23
Programming methodology lecture23Programming methodology lecture23
Programming methodology lecture23
NYversity
 
Programming methodology lecture22
Programming methodology lecture22Programming methodology lecture22
Programming methodology lecture22
NYversity
 
Programming methodology lecture20
Programming methodology lecture20Programming methodology lecture20
Programming methodology lecture20
NYversity
 
Programming methodology lecture19
Programming methodology lecture19Programming methodology lecture19
Programming methodology lecture19
NYversity
 
Programming methodology lecture18
Programming methodology lecture18Programming methodology lecture18
Programming methodology lecture18
NYversity
 
Programming methodology lecture17
Programming methodology lecture17Programming methodology lecture17
Programming methodology lecture17
NYversity
 
Programming methodology lecture16
Programming methodology lecture16Programming methodology lecture16
Programming methodology lecture16
NYversity
 
Programming methodology lecture15
Programming methodology lecture15Programming methodology lecture15
Programming methodology lecture15
NYversity
 
Programming methodology lecture14
Programming methodology lecture14Programming methodology lecture14
Programming methodology lecture14
NYversity
 
Programming methodology lecture13
Programming methodology lecture13Programming methodology lecture13
Programming methodology lecture13
NYversity
 
Programming methodology lecture12
Programming methodology lecture12Programming methodology lecture12
Programming methodology lecture12
NYversity
 
Programming methodology lecture11
Programming methodology lecture11Programming methodology lecture11
Programming methodology lecture11
NYversity
 
Programming methodology lecture10
Programming methodology lecture10Programming methodology lecture10
Programming methodology lecture10
NYversity
 

Mais de NYversity (20)

Programming methodology-1.1
Programming methodology-1.1Programming methodology-1.1
Programming methodology-1.1
 
3016 all-2007-dist
3016 all-2007-dist3016 all-2007-dist
3016 all-2007-dist
 
Programming methodology lecture28
Programming methodology lecture28Programming methodology lecture28
Programming methodology lecture28
 
Programming methodology lecture27
Programming methodology lecture27Programming methodology lecture27
Programming methodology lecture27
 
Programming methodology lecture26
Programming methodology lecture26Programming methodology lecture26
Programming methodology lecture26
 
Programming methodology lecture25
Programming methodology lecture25Programming methodology lecture25
Programming methodology lecture25
 
Programming methodology lecture24
Programming methodology lecture24Programming methodology lecture24
Programming methodology lecture24
 
Programming methodology lecture23
Programming methodology lecture23Programming methodology lecture23
Programming methodology lecture23
 
Programming methodology lecture22
Programming methodology lecture22Programming methodology lecture22
Programming methodology lecture22
 
Programming methodology lecture20
Programming methodology lecture20Programming methodology lecture20
Programming methodology lecture20
 
Programming methodology lecture19
Programming methodology lecture19Programming methodology lecture19
Programming methodology lecture19
 
Programming methodology lecture18
Programming methodology lecture18Programming methodology lecture18
Programming methodology lecture18
 
Programming methodology lecture17
Programming methodology lecture17Programming methodology lecture17
Programming methodology lecture17
 
Programming methodology lecture16
Programming methodology lecture16Programming methodology lecture16
Programming methodology lecture16
 
Programming methodology lecture15
Programming methodology lecture15Programming methodology lecture15
Programming methodology lecture15
 
Programming methodology lecture14
Programming methodology lecture14Programming methodology lecture14
Programming methodology lecture14
 
Programming methodology lecture13
Programming methodology lecture13Programming methodology lecture13
Programming methodology lecture13
 
Programming methodology lecture12
Programming methodology lecture12Programming methodology lecture12
Programming methodology lecture12
 
Programming methodology lecture11
Programming methodology lecture11Programming methodology lecture11
Programming methodology lecture11
 
Programming methodology lecture10
Programming methodology lecture10Programming methodology lecture10
Programming methodology lecture10
 

Último

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Último (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

Computer network (17)

  • 1. Anycast Communicate with “any” one of a set of nodes Can do this with DNS $ dig www.google.com ... ;; ANSWER SECTION: www.google.com. 604799 IN CNAME www.l.google.com. www.l.google.com. 300 IN A 74.125.19.103 www.l.google.com. 300 IN A 74.125.19.104 www.l.google.com. 300 IN A 74.125.19.147 www.l.google.com. 300 IN A 74.125.19.99
  • 2. Anycast at IP layer DNS allows anycast through name!address mappings Sometimes we need it at layer 3 itself - Single IP address refers to multiple hosts - Need to talk to any one of them Example: DNS root servers - Would like to scale number of root servers with Internet - Can’t use DNS (remember root servers hard-coded) - Want to query closest root server
  • 3. Anycast in Forwarding Tablse Remember, forwarding is longest-prefix-match An anycast address is a /32 address A single router may have multiple entries for the address Anycast best used in services where separate packets might go to different destinations
  • 4. The Cost A /32 routing entry! Multiple /32 routing entries!
  • 5. Further Advantages Geographic scoping Distributed Denial of Service (DDoS) - Load from DDoS is distributed across many anycast nodes F root server (192.5.5.241) now in 46 locations! Try the following: dig +norec @f.root-servers.net hostname.bind chaos txt
  • 6. I think we have a problem - Projected use of /8 blocks - From “A Pragmatic Report on IPv4 Address Space Consumption,” Tony Main, Cisco Sys-tems.
  • 7. IPv6 Work started in 1994 Basic protocol published in 1998 [RFC 2460] Brief lull, the progress in 2003-6 Hard push within IETF today for adoption
  • 8. IPv6 Key Features 128 bit addresses - Autoconfiguration Simplifies basic packet format through extension headers - 40 byte “base” header - Make uncommonly used fields optional
  • 9. IPv6 Addresses [RFC 4291] | n bits | 128-n bits | +-------------------------------+---------------------------------+ | subnet prefix | interface ID | +-------------------------------+---------------------------------+ Written as 8, ‘:’-separated 16-bit hex numbers - Example: 2001:470:806d:1:0:0:0:9 - Can omit a single run of 0s with “::” - Use brackets in URLs: http://[2001:470:806d:1::9]:80/ - Can write low 32-bits like IPv4: 64:ff9b::171.66.3.9 Like IPv4, specify subnet prefix with ’/’ - E.g., 2001:db8:122:344::/64 Most IPv6 networks use 64-bit subnet prefix, and end users should receive multiple /64s [RFC 6177]
  • 10. IPv6 address allocation Normal global unicast addresses start 2000::/3 - IANA doles out unicast prefixes to RIRs A few other special prefixes are assigned - :: (all 0s) is unspecified address, ::1 is localhost - Rest of 0::/8 used for IPv4 compatibility - fc00::/7 used for local addresses [RFC 4193] (kind of like IPv4 addresses 10/8, 172.16/20, 192.168/16 [RFC 1918]) - fe80::/10 used for link-local addresses - ff00::/8 used for multicast Over 85% of address space reserved - In the unlikely event we exhaust 2000::/8, can be more parsimonious with some other slice
  • 11. IPv6 multicast addresses | 8 | 4 | 4 | 112 bits | +------ -+----+----+---------------------------------------------+ |11111111|0RPT|scop| group ID | +--------+----+----+---------------------------------------------+ - T: 1 = transient, 0 = group ID assigned by IANA - P: 1 = address embeds global IPv6 prefix (T must also be 1) - R: 1 = (requires T = P = 1) encodes rendezvous point Scope 1 = interface-local, 2 = link-local, . . . Some groups assigned by IANA: - ff02::1 = all nodes, ff02::2 = routers, ff02::1:2 = DHCP - ff02::1:ffxx:yyyy - nodes w. unicast address . . . xx:yyyy Send to Ethernet address 33:33:low-4-bytes-of-IP
  • 12. Deriving interface IDs from Ethernet addrs A 48-bit Ethernet MAC address looks like this: +----------------+----------------+----------------+ |cccccc0gcccccccc|ccccccccmmmmmmmm|mmmmmmmmmmmmmmmm| +----------------+----------------+----------------+ - c is manufacturer’s organizationally unique identifier - 0 identifies this as a globally unique address - g is 0 for unicast MAC addresses - m are address bits assigned by manufacturer Convert MAC addr to 64-bit interface ID by flipping 0, sticking hex fffe in middle [RFC 4291]: +----------------+----------------+----------------+----------------+ |cccccc1gcccccccc|cccccccc11111111|11111110mmmmmmmm|mmmmmmmmmmmmmmmm| +----------------+----------------+----------------+----------------+
  • 13. Interface IDs in IPv6 addresses 64-bit subnets allow use of derived interface IDs - Using Ethernet address reduces the need for DHCP - Manually assigned addresses (with global bit 0) won’t conflict with ones derived from Ethernet addresses - E.g., use interface ID 1 for default router, won’t conflict with any derived interface IDs Link-local subnet fe80::/64 is important - Means you are guaranteed an address on every interface - Look on your machine. . . ifconfig will show IPv6 address - But can’t route to fe80::/64 without knowing interface
  • 14. IPv6 API [RFC 3493] struct sockaddr_in6 { sa_family_t sin6_family; /* AF_INET6 */ in_port_t sin6_port; /* transport layer port # */ uint32_t sin6_flowinfo; /* IPv6 flow information */ struct in6_addr sin6_addr; /* IPv6 address */ uint32_t sin6_scope_id; /* set of interfaces for a scope */ }; sin6 scope id specifies interface - New library calls if nametoindex, etc., to get values In address conversion, specify interface w. ‘%’ - E.g., ping6 fe80::230:48ff:fe8e:d7a0%eth0
  • 15. IPv6 Header [RFC 2460] Ver Class Flow Length Next Hdr. Hop limit Source (16 octets, 128 bits) Destination (16 octets, 128 bits)
  • 16. IPv6 Header Fields Version, 4 bits: 6 for IPv6 Class: 8 bits: like TOS in IPv4 Flow, 20 bits: identifies a flow [RFC 6437], but not really used yet Length, 16 bits: datagram length Next header, 8 bits: more later Hop limit, 8 bits: like TTL in IPv4 - Certain packets (e.g., redirect) must have Hop limit 255 - Ensures will be ignored if not from local net Addresses: 128 bits each
  • 17. Autoconfiguration [RFC 4862] radvd advertises prefixes with ICMP [RFC 4861] - Program run by one or more routers on link - Lets clients be configured without running DHCP - But ICMP message also has bit to say DHCPv6 available ICMP contains prefixes + per-prefix info: Valid lifetime and preferred lifetime - Longer valid than preferred lets address become deprecated Autonomous config bit - 1 means receiving kernel immediately assigns address based on prefix and derived interface ID On-link bit – says whole prefix reachable on link
  • 18. Prefixes vs. links In IPv4, address/prefix says what’s on link - E.g., Your address is 192.168.1.101/24 - Sending to 192.168.1.102? Use ARP to get link-level address - Sending to 192.168.2.102? Send to router IPv6 decouples address from what’s on-link - E.g., can reach on-link prefixes without address in prefix - Can advertise prefix for autoconfig, but not on-link - ICMP redirects can tell you about more on-link nodes
  • 19. Neighbor discovery [RFC 4861] Recall IPv4 uses ARP to get Ethernet from IP addr IPv6 doesn’t need a non-IP protocol like ARP If address is known on-link, use ICMP - Recall multicast address ff02::1:ffxx:yyzz (solicited node address) goes to all nodes with addresses ending . . . xx:yyzz - Hence they listen to link-layer address 33:33:ff:xx:yy:zz - Multiple addrs, same interface ID? Just one 33:33: addr - Also learn of neighbors from their traffic Nodes aggressively time out valid neighbor info - If prefix not on-link, send to router again - Router can always send you a redirect
  • 20. Extension Headers Two types: destination and hop-by-hop Both have a next header byte Destination headers: intended for IP endpoint - Fragment header, Routing header (loose source routing) - Destination options Hop-by-hop options header (type 0) - Must be first extension header in packet - Contains series of options for processing at each forwarder - Unknown options handled depending on top two bits of 8-bit option type (ignore, drop packet, send ICMP) - 3rd bit says if option can change in transit
  • 21. Example Next Header Values Assigned from same space as protocol numbers 0: Hop-by-hop options header 4: IPv4 6: TCP 17: UDP 41: IPv6 43: Routing header 44: Fragmentation header 58: ICMPv6 60: Destination options
  • 22. MTU Requirement IPv4 requires a 576-byte link MTU IPv6 requires 1280-byte MTU If link MTU is smaller, then it MUST support sub-IP fragmentation and assembly to provide a 1280-byte MTU It SHOULD provide a 1500-byte MTU; nodes MUST receive 1500 byte packets
  • 23. Fragmentation Revisited High-loss links (e.g., wireless) can be a problem 10-hop route, each link has a 10% drop rate (90% success rate) - Probability one fragment arrives is 0:910 35% - Each fragment is transmitted 1 + 0:9 + 0:92 + 0:93:::0:99 6:5 times along the route - 100% chance on first hop, 90% on second hop, 81% on third hop, etc.
  • 24. Fragmentation Revisited, Continued If a packet has four fragments, delivery probability is 0:354 1:4% Total transmissions/delivery = 1 0:014 P9i =0 0:9i Total transmissions/delivery = 65 6:5 = 423 Fragmentation header in IPv6 is a destination header - Fragmentation is possible, but must be done at the source
  • 25. Link-layer reliability High-loss link layers usually have single-hop acks and retransmissions - End-to-end argument: when can layer 2 reliability fail end-to-end? 10-hop route, each link has a 10% drop rate - Expect 1 0:9 1:1 transmissions/link - 10 links, 11 transmissions - 44 transmissions/delivery
  • 26. v4 API Interoperability How to make code work w. IPv4 and IPv6? Client side relatively simple - getaddrinfo can return IPv6 or IPv4 address [RFC 3493] - AI ADDRCONFIG flag says only return addresses in family n if some interface has non-link-local address of family n - Just create socket of right type when connecting Or use IPv4-mapped IPv6 addresses [RFC 4038] +--------------------------------------+--------------------------+ |0000..............................0000|FFFF| IPv4 address | +--------------------------------------+----+---------------------+ - getaddrinfo returns (w. AI V4MAPPED), works for servers - Disabled by IPV6 V6ONLY socket option
  • 27. Tunneling IPv6 over IPv4 How to join IPv6 given IPv4 connection? Idea: Tunnel IPv6 inside IPv4 packets [RFC 4213] - IP protocol 41 is IPv6–lets you put IPv6 packet as payload of IPv4 (or IPv6) packet - Known as Simple Internet Transition or sit tunnels IPv4 Header IPv6 Packet IPv6 Packet
  • 28. Tunneling IPv6 over IPv4 Can get account from a tunnel broker [RFC 3053] - Multiple free options available, e.g.: Easy to setup - Run radvd on one machine - Most machines support IPv6, will start using it when they get route advertisement ICMPs - Instant benefit for reaching machines behind NAT w. v4
  • 29. How can an ISP deploy IPv6? Already invested in expensive IPv4 infrastructure - Too expensive to replace core routers (even if they claim to support v6, might be too slow or buggy) What if ISP controls Customer Edge (CE) routers? - Often embedded linux boxes using software routing, so can just upgrade the software 6rd (rapid deployment) provides IPv6 on IPv4 infrastructure [RFC 5569][RFC 5969] - ISP Free offered 1.5M customers IPv6 in 5 weeks using 6rd - Changed CE software, installed border relays (BRs), but left their expensive v4 infrastructure untouched
  • 30. How 6rd works Embed customer’s IPv4 address in IPv6 address | n bits | o bits | m bits | 128-n-o-m bits | +---------------+--------------+-----------+------------------------+ | 6rd prefix | IPv4 address | subnet ID | interface ID | +---------------+--------------+-----------+------------------------+ |--- 6rd delegated prefix ---| - 6rd prefix is globally routable prefix belonging to ISP - E.g., 32-bit prefix + 0-bit subnet ID = 1 /64 per customer CE routers statelessly translate v6$v4 - Embed full IPv6 packet in a v4 packet, using sit - Send sit packet to nearest BR using IPv6 anycast (e.g., might use address in 192.88.99.0/24 [RFC 3068]) BRs determine incoming sit IPv4 from IPv6 dest
  • 31. 6rd and [RFC 1918] private addresses What if ISP has more customers than IPv4 addrs? E.g., say multiple domains all re-use 10.0.0.0/8 - Then don’t need first octet of IPv4 Configure CE with IPv4MaskLen - Number of bits that get stripped off IPv4 address when embedded in IPv6 - Use extra bits to encode address domain in v6 address DHCP option 212 lets CE routers learn parameters
  • 33. IPv4 Status IANA is already out of IP addresses
  • 34. A Market in Addresses? A market won’t solve the problem, though IPv4 addresses can’t be legally owned in some regions Trading will further fragment the address space
  • 35. 6lowpan and the Internet of Things
  • 36. Internet of Things Increasing connectivity: wireless controllers, light switches, etc. Home area networks, personal area networks Today: vertically integrated, separate technologies Goal: connect them with IP Imagine every light has an IP address. . .
  • 37. 6lowpan IETF working group on IPv6 for low-power personal area networks (PANs) Tiny, energy constrained, wireless devices: smart homes, ubiquitous computing Link layers have tiny MTUs: (802.15.4 is 127 bytes) [RFC 4944]
  • 38. 6lowpan Header Compression 6lowpan tries to compress common cases: TCP, UDP, etc. Example: address compression - 6lowpan must allow full 128-bit addresses - Address fields alone are 32 bytes! - But often they can be shortened. . .
  • 39. 6lowpan Header Compression [RFC 6282] 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | 0 | 1 | 1 | TF |NH | HLIM |CID|SAC| SAM | M |DAC| DAM | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  • 40. 6lowpan Compression Flags SAC: Source address (stateful?) DAC: Destination address (stateful?) SAM/DAM: compression scheme used, for stateless: - 00: Full 128 bit address - 01: 64-bit address, other 64 are link-local prefix padded with zeros - 10: 16-bit address, other 112 are as above - 00: 0-bit address, 64-bit link local prefix + 64-bit link layer address
  • 41. Multicast Problem: want to send a packet to many nodes - Examples: IP-TV, large audio stream Using n unicast packets means the same packet can traverse a single link many times a a src Internet gw a a a
  • 42. Multicast Approach Nodes can join a multicast group Denoted by a multicast IP address Routers build a routing topology - Link state vs. distance vector IGMP: Internet Group Management Protocol - Protocol for hosts to manage membership in multicast groups - Hosts talk to local multicast routers
  • 43. Example: Link State Tree Routers exchange link state Node advertise presence in group Routers compute shortest-path multicast tree Very expensive!
  • 44. Network Topology R1 R2 R3 R4 R6 R5 R7 A B C
  • 45. Tree for A as Multicast Source R1 R2 R3 R4 R6 R5 R7 A B C
  • 46. Tree for B as Multicast Source R1 R2 R3 R4 R6 R5 R7 A B C
  • 47. Practical considerations Multicast protocols end up being very complex Introduce a lot of router state Turned off on most routers Used within a domain, not between domains How does one handle congestion control?