Download presentation
Presentation is loading. Please wait.
1
Chapter 5 Addressing Dr. Clincy Lecture
2
Example 4 Solution The mask is 11111111 11111111 11111111 11000000 or
A company is granted the site address (class B). The company needs 1000 subnets. Design the subnets. Solution The number of 1s in the default mask is 16 (class B). The company needs 1000 subnets. This number is not a power of 2. The next number that is a power of 2 is 1024 (210). We need 10 more 1s in the subnet mask. The total number of 1s in the subnet mask is 26 ( ). The total number of 0s is 6 ( ). The mask is or The number of subnets is 1024. The number of addresses in each subnet is 26 (6 is the number of 0s) or 64. Dr. Clincy Lecture
3
Example 4 Subtract 63 from 255 to get 192 Dr. Clincy Lecture
4
SUPERNETTING Although class A and B addresses are dwindling – there are plenty of class C addresses The problem with C addresses is, they only have 256 hostids – not enough for any midsize to large size organization – especially if you plan to give every computer, printer, scanner, etc. multiple IP addresses Supernetting allows an organization the ability to combine several class C blocks in creating a larger range of addresses Note: breaking up a network = subnetting Note: combining Class-C networks = supernetting Dr. Clincy Lecture
5
Assigning or Choosing Class C Blocks
When assigning class C blocks, there are two approaches: (1) random and (2) superblock Random Approach: the routers will see each block as a separate network and therefore, for each block there would be an entry in the routing table – a router contains an entry for each destination network Superblock Approach: instead of multiple routing table entries, there would be a single entry. However, the choices of blocks need to follow a set of rules: #1 – the # of blocks must be a power of 2 (ie. 1, 2, 4, 8 …) #2 – blocks must be contiguous (no gaps between blocks) #3 – the 3rd byte of the first address in the superblock must be evenly divisible by the number of blocks – ie. if the # of blocks is N, the 3rd byte must be divisible by N Number of 1s removed from Default mask is dictated by the number of C blocks combined (ie 1 for 2, 2 for 4, 3 for 8, etc) Dr. Clincy Lecture
6
Example 5 A company needs 600 addresses. Which of the following set of class C blocks can be used to form a supernet for this company? Solution 1: No, there are only three blocks. Must be a power of 2 2: No, the blocks are not contiguous. 3: No, 31 in the first block is not divisible by 4. 4: Yes, all three requirements are fulfilled. (1. Power of 2, 2. Contiguous and 3. 3rd byte of 1st address is divisible by 4: 32/4=8) Dr. Clincy Lecture
7
Example 8 A supernet has a first address of and a supernet mask of How many blocks are in this supernet and what is the range of addresses? Solution The default mask has 24 1s because is a class C. Because the supernet mask is , the supernet has 21 1s. Since the difference between the default and supernet masks is 3, there are 23 or 8 blocks in this supernet. Because the blocks start with and must be contiguous, the blocks are , , ……… The first address is The last address is The total number of addresses is 8 x 256 = 2048 Dr. Clincy Lecture
8
Explain Supernetting Conceptually
Back out this bit from netid into host id Causes these 2 blocks to combine as a single block Dr. Clincy Lecture
9
Variable-length subnetting
Suppose you were granted a Class C address – this mean you would have 8 bits to play with Also, suppose you needed 5 subnets consisting of the following # of hosts: 60, 60, 60, 30 and 30 If you used a 2 bit subnet mask – can get 4 subnets with 64 stations each (too big) If you used a 3 bit subnet mask – can get 8 subnets with 32 stations each (too small) What’s the solution ? Dr. Clincy Lecture
10
Variable-length Subnetting
Solution: used 2 subnet masks – one applied after the other Could use a 2 bit subnet mask and get 4 subnets with 64 stations each - this would satisfy the three 60-host subnet requirement – therefore the subnet mask would be (192) We could then further divide one of the 64-host subnets into two 32-host subnets by applying this mask (224) after this mask of (192) is used Dr. Clincy Lecture
11
Ch 5 Classless Addressing
Dr. Clincy Lecture
12
Classful Addressing is Obsolete
Guess What ? Classful Addressing is Obsolete However, understanding the classful approach will help you easily understand the classless approach Quickly explain classless vs classful (leave address aggregation for the routing topics) Dr. Clincy Lecture
13
CLASSLESS ADDRESSING Recall the problems with Classful addressing – you have to get a predefined block of addresses – in most cases, the block is either too large or too small In the 1990’s, ISP came into prominence – they provide Internet access for individuals to midsize organizations that don’t want sponsor their own Internet service (ie. , etc). The ISP’s are granted several B and C blocks of addresses and they subdivide their address space into groups of 2, 4, 8, 16, etc.. – blocks can be variable length Because of the up rise of ISP’s, in 1996, the Internet Authorities announced a new architecture called Classless Addressing (making classful addressing obsolete) Dr. Clincy Lecture
14
Number of Addresses in a Classless Block
There are two conditions Condition 1: the number of addresses in a block; it must be a power of 2 (2, 4, 8, . . .). A household may be given a block of 2 addresses. A small business may be given 16 addresses. A large organization may be given 1024 addresses. Another Condition: The beginning address must be evenly divisible by the number of addresses. For example, if a block contains 4 addresses, the beginning address must be divisible by 4. If the block has less than 256 addresses, we need to check only the rightmost byte. If it has less than 65,536 addresses, we need to check only the two rightmost bytes, and so on. Dr. Clincy Lecture
15
Classless Subnet Illustration
Netid subnetid 1 Dr. Clincy Lecture
16
Example 9 Which of the following can be the beginning address of a block that contains 16 addresses? Solution The address is eligible because 32 is divisible by 16. The address is eligible because 80 is divisible by 16. Dr. Clincy Lecture
17
Example 10 Which of the following can be the beginning address of a block that contains 1024 addresses? Solution To be divisible by 1024, the rightmost byte of an address should be 0 because any value in that first byte will be a fraction of 1024 (ie. 0 to 255). To be divisible by 1024, the rightmost byte should be 0 and the second rightmost byte must be divisible by 4 because for every unique number in the second byte position, there exist 256 addresses in the first byte position that maps to it. To get 1024 addresses overall, you will need an increment of 4 in the 2nd byte position. Therefore, the 2nd byte needs to be divisible by 4. Only the address meets this condition. Dr. Clincy Lecture
18
Mask Recall the Classful approach, only given an IP – the user defined their mask For the Classless approach, when an org is given a block, it’s given both the starting address and the mask – these two pieces of info defines the entire block For classless case, instead of writing out the full mask, we just specify the number of 1’s in the mask and append it to the address – this is called slash notation or CIDR (classless interdomain routing) notation For classless addressing, the prefix refers to the common part of the address (ie. network portion) For classless addressing, the suffix refers to the varying part of the address (ie. host portion) Dr. Clincy Lecture
19
A block in classes A, B, and C can easily be represented in slash notation as A.B.C.D/ n where n is either 8 (class A), 16 (class B), or (class C). Dr. Clincy Lecture
20
There are only 8 addresses in this block.
Example 11 A small organization is given a block with the beginning address and the prefix length /29 (in slash notation). What is the range of the block? Solution The beginning address is To find the last address we keep the first 29 bits and change the last 3 bits to 1s. Beginning: Ending : There are only 8 addresses in this block. Dr. Clincy Lecture
21
Example 13 What is the network address if one of the addresses is /27? Solution The prefix length is 27, which means that we must keep the first 27 bits as is and change the remaining bits (5) to 0s. The 5 bits affect only the last byte. The last byte is Changing the last 5 bits to 0s, we get or 64. The network address is /27. Dr. Clincy Lecture
22
Example 14 An organization is granted the block /26. The organization needs to have four subnets. What are the subnet addresses and the range of addresses for each subnet? Solution The suffix length is 6. This means the total number of addresses in the block is 64 (26). If we create four subnets, each subnet will have 16 addresses. Dr. Clincy Lecture
23
Chapter 7: The Infamous IP
Dr. Clincy Lecture
24
Position of IP in TCP/IP protocol suite
Packets in the IP layer are called datagrams IP is an unreliable and connectionless datagram protocol To make IP reliable, TCP protocol is added Dr. Clincy Lecture
25
IP datagram IP datagram is variable length consisting of two parts (header, data) Header is bytes & contains routing and deliver info Ver – version of IP HLEN – header length – total length of the header field (in 4-byte words or units) Service type – now called Differentiated Services – tells the service type (ie. ftp, dns, telnet, etc..) – will come back to this Total length – defines the total length of the datagram including the header – need this to determine if padding is needed – recall Ethernet frame can range bytes – so if the IP datagram is less than 46 bytes (need padding) Identification – used for fragmentation – networks that are not able to encapsulate the full IP datagram will need to fragment – will come back to this Flags – used for fragmentation – will come back to this Fragmentation offset – used for fragmentation – will come back to Time to live – datagram life time as it travels – used to control the number of hops (routers) a datagram can traverse – fix infinite loop problems Protocol – defines the higher level protocol (ie. TCP, UDP, ICMP, ICMP, etc..) that’s using the service of the IP layer – since the IP Muxes data from the Transport layer – this field is used to demux Dr. Clincy Lecture
26
IP datagram Header cont…
Header Checksum – error checking (will cover later) Source Address – IP address of the source (remain unchanged as data traverses) Destination Address - IP address of the destination (remain unchanged as data traverses) Option – are not required for every datagram – used for network testing and debugging – will cover in more detail later Dr. Clincy Lecture
27
FRAGMENTATION Recall we stated that networks that are not able to encapsulate the full IP datagram will need to fragment As the datagrams travel through the network hitting various Routers – the router “decapsulates” the IP datagram from the frame The router then processes it Then the router encapsulates it in another frame This is how routers are able to communicate with various networks Router 1 Router 2 Network 1 Network 2 Network 3 Dr. Clincy Lecture
28
MTU Each Data Link Protocol has it own frame format – one field defines the max size of the data field – when datagram is encapsulated, the total size of the datagram must not exceed that max size (why ??? - HW/SW limitations of the physical network) That value is called a MTU (maximum transfer unit) The largest possible MTU is 65,535 and if this is used – it makes the IP protocol independent of the underlying physical network If any other MTU is used, there will be cases possibly where the datagram needs to be fragmented in order to pass through that network As it passes through the network, a previous fragment can be fragmented again if that physical network has a smaller MTU Dr. Clincy Lecture
29
Flag field Fields related to the fragmentation are the ID field, flags field and fragmentation offset field Id – combo of the Id and source Ip address (IP protocol used a counter to label datagram) Flags: 1st reserved, if D set, can’t fragment (must drop if can’t pass), if D=0, can fragment. If M is set, means more fragments exist Fragment offset – shows relative position of the fragment with respect to the whole datagram Dr. Clincy Lecture
30
Fragmentation example
Take a datagram of original size 4000 bytes (byte 0 to 3999) and fragment it into 3 fragments The fragment offset is measured in units of 8 bytes. So the first offset would be 0/8=0 since the starting byte position is 0 The second starting byte position is 1400 and therefore the offset is 1400/8= 175 The third starting byte position is 2800 and therefore the offset equals 2800/8=350 This is done to ensure the offset can fit in the 13-bit field Routers/Hosts that fragment must pick a size of each fragment so that the 1st byte is divisible by 8 (ie. 0, 8, 16, 24 ……696 …… 1400 …… ……… 2800 … etc) Dr. Clincy Lecture
31
Total Length Id isn’t changing
Detailed example Total Length Id isn’t changing Allow “more” fragmentation XDM D=1, can’t frag D=0, can frag M=1, more frag exist M=0, no more frag exist offset Dr. Clincy Lecture
32
Re-assembly Even if the fragments arrived to the destination out-of-order, the destination host could reassemble by: The 1st fragment always has an offset of zero If the 1st fragment’s length is divided by 8, it equals to the 2nd fragment’s offset If the 1st and 2nd fragments’ total length are divided by 8, it equals to the 3rd fragment’s offset Continue … The last fragment’s “more” bit should be set to 0 – meaning no more fragments remaining Dr. Clincy Lecture
33
Recall - IP datagram IP datagram is variable length consisting of two parts (header, data) Header is bytes & contains routing and deliver info Haven’t covered options yet Option – are not required for every datagram – used for network testing and debugging – will cover in more detail later Dr. Clincy Lecture
34
Option format Composed of a 1-byte code field, a 1-byte length field and a variable-sized data field Length field defines the total length of the option (including the code field) Data field contains the data of the specific option – some option types don’t require data Code field is 8-bits long and contains 3 subfields: copy, class and number Copy: controls presence of option. If 0, means copy options to the first fragment only; if 1, means copy option to all fragments Class: defines general purpose of options. If 00, options is used for datagram control; if 10, options used for management and debugging. Number: defines the type of option. As of now, only 6 types defined Dr. Clincy Lecture
35
Regarding the Number field
Number: defines the type of option. As of now, only 6 types defined 2 of the option types are 1-byte in size (doesn’t need length and data fields) 4 of the options are multiple-byte and require the length and data fields Used as a filler between options (using a 16-bit or 32-bit boundary) – know the starting point of the next option Used at the end of the last option for padding Record the Internet routers that can handle the datagram ( can list up to 9 router IP addresses) Used by the source to predetermine a route for a datagram as it traverses Used by the source to predetermine a route too (but more relaxed than the Strict Source Route Option) Record the time the datagram is processed by a router Dr. Clincy Lecture
36
Regarding the Record route option
The Tx creates a placeholder for the visited routers to fill in their IP addresses The pointer field is used to point to the first empty entry so the router knows where to enter it’s outgoing IP address (address the datagram is leaving) Dr. Clincy Lecture
37
Record route concept Can have only 3 IP addresses because of 12+3=15
Outgoing IP address Pointer field value of 4 when starting out Increment pointer Dr. Clincy Lecture
38
Regarding the Strict source route option
Option used by the source to predetermine a route for the datagram as it traverses the Internet In this case, the routers are specified up front in dictating the specific route. All routers MUST be visited – if other routers are visited, the datagram is dropped) – if all of the listed routers are not visited, the datagram is dropped Routers are entered by the sender Why: security, distinguish among different networks, don’t want certain traffic to leave your network, etc. Dr. Clincy Lecture
39
Loose source route option
Similar to the Strict Source Route Option but more relaxed In this case, the routers are specified up front and all MUST be visited ( however, other routers can be visited too) Dr. Clincy Lecture
40
Timestamp option Used to record the time of datagram processing by a router (expressed in milliseconds from midnight) Use this to track the routers’ behavior – time from one router to the next O-flow: # of routers that could not add their timestamp Flags: dictates what the router should do (ie. add timestamp, add timestamp & IP address, etc..) Dr. Clincy Lecture
41
CHECKSUM The error detection method used by most TCP/IP protocols is called checksum The checksum protects against bit corruption that could possibly occur during transmission Checksum calculated at the Tx and is appended with the sent data The Rx repeats the calculation in determining if the data is correct or not Give them an analogy in base-10 Dr. Clincy Lecture
42
To create the checksum the sender does the following:
1. The packet is divided into k sections, each of n bits (usually 16) 2. All sections are added together using one’s complement arithmetic. 3. The final result is complemented to make the checksum. Checksum process at the receiver is as follows: The received packet is divided into k sections All sections are added together 3. The final result is complemented and should equal zero if correct NOTE: value + (-value) = 0 Dr. Clincy Lecture
43
When to apply the checksum
For IP datagram, Checksum is used on the header only (and not the data) The header needs to be check because it’s changing router-to-router (the data itself is static) Recall that the higher-level protocols encapsulate data into the datagram and uses their own checksum Dr. Clincy Lecture
44
Recall Binary Addition
1010 (neg 5) +0010 (pos 2) 1100 (neg 3) 1101 (neg 2) +0111 (pos 7) 10100 (overflow – add the 1 back) 0101 (pos 5) Recall complement 0011 Dr. Clincy Lecture
45
ROUTING IP OVER ATM The IP packet is encapsulated in cells (not just one). An ATM network has its own definition for the physical address of a device. Binding between an IP address and a physical address is attained through a protocol called ATMARP. Each Router has an IP address which associates with the packet-switch side of the network (Internet) The ATM side of the router uses its own 20-byte physical ATM address And in guiding the cells across the ATM network, Virtual Circuit Identifiers are used In a LAN case, broadcasting is used by ARP – in a ATM case, broadcasting can’t be used – another approach is needed - ATMARP Dr. Clincy Lecture
46
Next Slides - Go Over Final Project
Dr. Clincy Lecture
47
CS4622 Final Project Objective: Research & Teach a “CS4622 Related “ Subject at a high-level using existing knowledge Teams will teach the class about a specific topic at a “high-level” relating to topics covered in CS4622 – no paper required – only power point slides required – you can scan images into the slides Due July 16th by 5pm – upload ppt slide presentation to D2L – docked 1% per each hour late Presentations will occur on July 17th (odd-numbered teams) and July 19th (even-numbered teams) - no teams will have to sit through 2 evenings of presentations – you can show up on your presentation day only. Your team has 20 minutes for the presentation – must be in powerpoint form All team members must present Docked for going over or below time limit of 20 minutes (5% per minute) Graded on (1) lecture clarity, flow and thoroughness (65%), (2) slide quality (15%), and (3) perceived team work (20%) Your presentation should flow as one lecture and not disjointed (can’t divide the subject – everyone must understand the entire subject – if not, will lose points on flow) Slides sent on July 16th by 5pm will be the final presentation used – no need to bring slides – can not change slides after July 16th (5 pm) – can only use the slides posted You should list the various sources you referenced in your lecture Team decision and strategy in determining “how” to cover the topic in 20 minutes. Team members are responsible for researching (and learning) together and organizing the lecture as a team – teamwork – I can sense teamwork or not before and during the presentation The Presentation topics will not be covered on any exam Will lose points for reading from cue cards or any source (including the actual ppt slides) - seeking for you to understand the topic at a high-level well enough to teach and instruct - not read. Will lose points for very “wordy” slides. Team numbers don’t indicate presentation order. NOTE: it take approximately 10 to 14 power point slides to conduct a 20 minute talk – your team is responsible for making sure the talk is timed for 20 minutes Words of advice: (1) don’t wait until the last minute to get started and (2) if you have problems with a team mate, let me know ASAP – don’t wait 1 or 2 weeks before the presentation (or the day of the presentation) – if so, it’s too late to take action
48
Topics Team 1 – Dark Web/I2P/Deep Web Team 2 – SCTP
Team 3 – Network Security: DNS Spoofing, ARP Poisoning Team 4 – Network Security: DoS Attack, Smurf Attack Team 5 – Internet of Things (IoT) Team 6 – Mobile IP NOTE 1: You are responsible for contacting your team members via initially NOTE 2: Will lose points if you use Wikipedia (non-credible source) Odd-numbered teams present July 17th (Teams 1, 3 and 5) Even-numbered teams present July 19th (Teams 2, 4 and 6) Only need to come on your team’s presentation day NOTE: Online lectures #24 and #25 will be posted on July 17th and July 19th, respectively
49
You only need to come on your team’s presentation day
Presentations will occur on: July 17th (odd-numbered teams: 1, 3 and 5) July 19th (even-numbered teams: 2, 4 and 6) - You only need to come on your team’s presentation day TEAM FULL_NAME 1 Cardwell, Jon Fredricks, Mark Leiper, Jake Vina, Ryan 2 Ahmed, Nawal Clifford, Harrison Kimani, Frank 3 Crews, Randy Hoffler, Stephen Natic, Alex 4 Countess, Raymond Fuentes, Ernesto Negahdar, Arash Nunnelley, Ben 5 Farris, Jacques Lee, Joshua Pellegrini, Adam 6 Hunsinger, Clayton Jiang, Xiaoju Taylor, Jeremy Dr. Clincy Lecture
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.