Where are the Designated Router in this picture? - ospf

I have the following network diagram and I want to know which interface on every router is the Designated Router?
I got the message that Router1 on interface 192.168.4.1 is the Designated Router but I do not know why?
Router1 does not have any Router-Id and Loopback-IP, so how can it be that this interface becomes Designated Router?
Compared to Router 2, which has a Router-Id and a Loopback - IP, its interface with the IP address 192.168.4.2 must become in my understanding the Designated Router.
I know the election has the following priority:
1) Highest priority
2) Router-Id
3) Loopback - IP
4) Interface - IP
Maybe, someone can tell me what I am doing wrong here?
Thanks in advance.

I will answer my question :)
Designated Router will be chosen the following way:
1) The highest Priority counts
2) The highest Router-Id
3) The highest Loopback - IP
4) The highest Interface - IP
Priority defaults to 1.
So, Router - Id counts in the beginning.
If Router - Id is missing and all the others, too, the highest Interface - Ip will be taken as the highest Router - Id.
In my example, let us take the Router 1:
It has neither a Router - ID nor a Loopback - Ip.
So, its highest Interface will be taken as the Router - Id and this one will be compared with Router 0s Router-Id.
Router1: 192.168.1.7 > Router0: 3.3.3.3

Related

CIDR /28 calculation confusion

I am trying to learn how to calculate IP addresses from CIDR block.
For example, 10.88.135.144/28 or
10.88.135.10010000/28
From what I understand, that means first 28 bits are associated with network address while the rest 4 bits are host addresses. That would result in following IP range:
10.88.135.10010000 - 10.88.135.10011111
The first IP should be 10.88.135.144 and last IP address should be 10.88.135.159
But according to cidr.xyz. The first IP should be 10.88.135.145 and the last one should be 10.88.135.158.
I really can't figure out why. Can anyone explain the reason for me? Thanks!
Generally, the first IP is the network identifier and cannot be assigned to any device.This is used by router or switch on the network.
The last one is the broadcasting IP and cannot be assigned to any device as this IP is used by router or switch on the network to broadcast information.
https://www.quora.com/In-IP-addresses-what-is-meant-by-network-ID-and-host-ID
https://supportforums.cisco.com/t5/wan-routing-and-switching/what-is-broadcast-address/td-p/2494445#messageBodySimpleDisplay_1

Classless addressing

Your router has the IP address of 216.83.11.65/27. You wish to connect
a new system on the network. Which of the following addresses would
you assign to the new system.
A: 216.83.11.45
B: 216.83.11.87
C: 216.83.11.95
D: 216.83.11.96
The answer is B, but I'm not sure why. Can I get a step by step breakdown?
Your host network can chose from all the bits in the IP address, that are not used to define the network.1
So when looking at the Network Configuration you have, your network has the following range (you can use a subnet calculator to get to these values):
216.83.11.65 - 216.83.11.94
This rules out A and D, because you will need a router to get there (since the IP addresses cannot be directly reached within the network).
Your network internal broadcast address will be 216.83.11.95. This rules out answer C, because a host cannot have the broadcast address of your network.
So, only answer B stands.
1 I know that this might not be understandable at all. Cannot do it better. In this case please refer to Wikipedia: Classless Inter-Domain Routing

IP Address Class C network and its gateway

Suppose I have following network setup, in a ethernet:
I manually setup start IP and end IP as following:
192.168.2.1 - 192.168.254.254
Manually setup Gateway IP as:
192.168.2.1
Of course, Mask length as:
16
Subnet Mask:
255.255.0.0
Now my question would be following:
Class C network should starting with range: [128, 191], if I'm using 192.*.*.* and setup subnet mask as 255.255.0.0, does it work?
Is there any specific requirement to setup gateway in order to make sure range 192.168.2.1 - 192.168.254.254 work?
For any gateway that: 192.168.2.1 < gateway < 192.168.254.254, it should work for the range?
Suppose within this ethernet, I manually change one's IP to 192.168.1.*, does it able to ping gateway (192.168.2.1)?
Answers:
Since only recently (i. e. about 20 years ago), classful networking is obsolete in favour of CIDR. So you can have an IP range in the old Class A which has a netmask length of 24 bit, or a range in the former Class C range with a netmask length of 16 (or maybe even 17, 18, whatever) bits.
You need a gateway if you want to communicate outside of your network.
The range is defined by the net mask. Even if you only want to use 192.168.2 to 192.168.254, there is no way to exclude 0, 1 and 255 as the third octet, so 192.168.1.* is perfectly reachable from your subnet.
192.168.0.0/24 is address of restricted private IP subset wiki It will work.
Gateway is rather term of specified host within network which has access to other networks. It's address must be accessible from network.
Yes. (Of course if physically connected)

VLSM Calculation

Network - 193.197.74.0 /24
There are 6 routers : A,B,C,D,E,F
router A - DMZ - 12
router B - 60hosts
router C - 20hosts
router D - 10 hosts
router E - 25hosts
router F - 50hosts
These routers are connected in a ring topology
There a conditions given below before I can calcuate the VLSM.
Subnet zero and last subnet(1-bit subnets) are forbidden
"By this I understand that it means, the first possible subnet address and the last possible subnet address should not be used. "
2.The lowest and highest subnet IPs are for normal serial inter router connection
" By this I understand, that the network address should be given for connections between Router A - Router B - and so no." Is that correct?
3 - The biggest subnet should be in the middle of possible address
"In cisco netacad, I read that the highest possible address should be taken first , with that I can calculate the subnet mask and the first and last possible hosts"
4 - The lower in size matching subnet is to use a DMZ - Network
" Does that mean that , I have to choose the lowest subnet - (Least possible hosts) and pick that for DMZ"
I need no solution for this, but I just to understand the question correctly that way I can solve it.
My understanding were mentioned above :)
1)Nowadays by default in cisco routers no subnet zero is enabled that means you can use first subnet for allocation.
2)cisco has behaviour of longest possible match means if you have two networks to reach same destination 10.1.1.0/27 and 10.1.1.0/30 then second one will go in routing table as cisco starts counting network address from LSB which in this case is 32 then 31 then /30 ITS HIT AND GOES TO ROUTE TABLE.
Plan acordingly and note that LONGEST POSSIBLE MATCH has an precedence over AD value of routing protocols value.

Understanding vlan treatment on packet

Hi every one i am trying to understand vlan behavior on tagged and untagged packets.i have come across these statement which sounds quite confusing to me
When a tagged packet enters a port, the default VLAN ID setting has no effect on the tag.
1. The packet proceeds to the VLAN specified by its VLAN ID tag number.
2. If the port in which the packet entered does not belong to the VLAN
specified by the packet’s VLAN ID tag, the system drops the packet.
3. If the port belongs to the VLAN specified by the packet’s VLAN ID,
the system can send the packet to other ports with the same VLAN ID.
I am so confuse in all these statements.How does these three differ. They are contradicting one an other what does packet /port belong to specific vlan ID mean as port can have only one vlan ID
Overview
I have been refraining from answering this question, since I thought it would get migrated to Server Fault; since it is lingering here, I will address the specifics of your question. It is also difficult to completely respond without more context of why the author was making those points, but I will endeavor to answer as best I can. I'm not sure why I spent so much time answering this question, other than it's Christmas and my wife is out of the country visiting her family...
Diagram
I think the concepts are best illustrated by something called a multi-layer switch, which is just an ethernet switch that also understands IP addresses. I drew a diagram to illustrate:
The switch has four physical interfaces, numbered Port 1/1, Port 1/2, Port 1/3 and Port 1/4
The switch has one virtual interface, Vlan12. The virtual interface has an ethernet mac-address and an IP address assigned to it.
Three ethernet frames are assumed to enter Port 1/1
Port 1/1 is configured to accept Vlan tags 12 and 13. Port 1/1 also has a default Vlan of 1; this means that any untagged frames are put into Vlan 1.
The first decision point an ethernet switch uses is determining what Vlan a frame belongs to.
Next the ethernet switch looks at it's database of ethernet mac-addresses that it knows
Answers
I am so confuse in all these statements.How does these three differ. They are contradicting one an other what does packet /port belong to specific vlan ID mean as port can have only one vlan ID
Actually it depends on the kind of port we are discussing. The author is very clearly describing what happens on an ethernet switch port in trunk mode.
Ethernet trunk mode ports can process than one Vlan ID, if they are in trunk mode (see Port 1/1 in the diagram). Port 1/1 can accept ethernet frames with either Vlan 12 or Vlan 13; however, those frames must have an 802.1q tag on them so the switch knows which Vlan they belong in
Ethernet Access mode ports have only one Vlan assigned.
To address the points in quoted from the text...
When a tagged packet enters a port, the default VLAN ID setting has no effect on the tag.
1. The packet proceeds to the VLAN specified by its VLAN ID tag number.
This is best illustrated by what could happen to Frame A.
Even though Port 1/1 has a default Vlan (Vlan 1), Frame A remains assigned to Vlan 12. As such, it could exit Port 1/2, 1/3 or go directly to Virtual Interface Vlan12:
If Frame A goes out Port 1/2, the 802.1q tag (12) sent into Port 1/1 remains on Frame A, because Port 1/2 is in trunk mode
If Frame A goes out Port 1/3, the 802.1q tag (12) sent into Port 1/1 is removed from Frame A, because Port 1/3 is in access mode
If Frame A is delivered to Virtual Interface Vlan12 (if Frame A's destination mac-address is 000a.dead.beef), the switch doesn't need to forward the frame anywhere else. Normally the reason that you would see an ethernet frame addressed to a virtual interface on the switch is for management purposes, such as telnet, ssh or snmp. There are other reasons, but let's not complicate things any more for now.
... 2. If the port in which the packet entered does not belong to the VLAN
specified by the packet’s VLAN ID tag, the system drops the packet.
This is best illustrated by what happens to Frame B.
Port 1/1 is not configured to accept Vlan ID 20, so when the switch sees "20" in the 802.1q tag, Frame B is discarded.
... 3. If the port belongs to the VLAN specified by the packet’s VLAN ID,
the system can send the packet to other ports with the same VLAN ID.
This again refers to Frame A; in this case the author describes what could happen if the switch does not deliver Frame A to Virtual Interface Vlan12.
Finally I included Frame C for your reference. This is to illustrate the behavior of a default Vlan on an ethernet trunk port.
Merry Christmas, and good luck with your studies.
Let's take a step back and just look at the concept here.
If you just have a "dumb" switch, it only has one VLAN, and that VLAN is "untagged". That means each packet has a "normal" Ethernet header which does not include the 802.1q tag.
If you want to multiplex more than one network over a single physical medium, the switch has to have some way to tell the networks apart. The way it does that is by using a VLAN tag. Let's imagine you have two switches connected to each other, and you have three VLANs, 100, 200, and 300.
Imagine the two switches are connected to each other with only 1 cable to port A on each switch. You would configure port A on each switch to accept and forward tagged traffic on those three VLANs. Then you would configure the ports you wanted to be in VLAN 100, 200, and 300 as that port's default VLAN, on each port exposed to end users.
In summary, a few important points:
VLAN tags are used to multiplex multiple logical layer 2 networks over the same physical link
VLAN tags are normally used between infrastructure devices (and possibly servers) and are not seen on end users' networks
A switch is typically configured such that when a packet is switched, the appropriate tag is added as the packet traverses the network infrastructure, and then removed before an end user device sees the packet again.
Kind of hard to explain. Hope this helps.
When a tagged packet enters a port, the default VLAN ID setting has no effect on the tag.
means that when a packet enters some switch with some VLAN ID assigned to it.. it will continue travelling inside the switch with same vlan id. If the packet has no vlan id then packet will be assigned default vlan id which is generally 1.
1. The packet proceeds to the VLAN specified by its VLAN ID tag number.
because the packet has vlan id assigned, it will proceed ahead with same vlan id.
2. If the port in which the packet entered does not belong to the VLAN
specified by the packet’s VLAN ID tag, the system drops the packet.
packet will enter into some port decided by switch based on destination ip address in packet header and routing table inside switch. If that port does not have permissions to transmit packets with vlan id of that particular packet, then the port will drop the packet.
3. If the port belongs to the VLAN specified by the packet’s VLAN ID,
the system can send the packet to other ports with the same VLAN ID.
Otherwise if the port has permissions to transmit packets with that particular vlan id then it will transmit the packet ahead.
this same criteria will be followed in every switch it encounters till the packet reaches its destination.
both frames B and C would be discarded. If native vlan is not allowed in the trunk then the untagged frame wont be allowed to travel
VLAN tag is a part of a packet link header (on the 2nd ISO/OSI layer).
You have two possibilities of setting a port:
1) Port belongs to the VLAN (access mode).
This implicates two behavior:
a) Inside of switch every port has its own VLAN ID (default is normally VLAN 1). Every port in this mode rejects ingress 802.1q tagged frames and automatically assigns untagged frames to the VLAN ID of this port.
b) If a frame enters a port associated with this mode, and egresses a trunk port (below), the frame will be tagged with an 802.1q header with the appropriate VLAN ID associated with the ingress port.
As you can see, When you set a half ports on the switch to the VLAN5 and a half to the VLAN2, you will divide switch to the two parts and you will have two virtual switches.
2) Port is 'trunking port'
Through this port are going packets without modifications to other switch or PC, which can work with the tagged packets. On some switch you can use filter, where you can specify, which VLAN (or, which number of tag of VLAN) can pass through this port. But this port don't change the VLAN tags.
In this case, packets outside of switch goes exactly with the same tags, as inside of switch.

Resources