Initially, there is no ARP entry present on either of the PC, means that neither of the PC or R1 is having any information of destination MAC address which is necessary for each other communication.

ARP entry of PC1 ,PC2 and R1 at initial phase

PC1

PC2

R1

Now lets initiate a ping request to PC2 from PC1 , as PC1 does not know the MAC address of router so , so first frame is broadcast asking Who has 192.168.1.1 ? Tell 192.168.1.10 (PC1) . If you sees the first ping packet , its generally dropped ,it’s because of same reason.

Let’s have a look at detailed ARP capture

PC1 – Broadcast Frame

In this capture , we can see that ARP packet with Opcode =1(request) , with sender MAC, target MAC and Sender IP address, but as PC 1 is not aware of Target MAC address, so it puts broadcast address (ff:ff:ff:ff:ff:ff) for Target Mac address and broadcast the frame.

First frame is broadcast asking Who has 192.168.1.1 ? Tell 192.168.1.10

Router R1 configured with the IP address 192.168.1.1 sends a reply which is unicast to source PC1 . Let’s have a look of the ARP capture for unicast frame

PC1 – Unicast Frame

Above ARP frame capture is having Opcode as 2 i.e reply. The sender IP is now 192.168.1.1 (R1 ) and destination IP is 192.168.1.10 (PC1) ,accordingly R1 unicast the frame with source MAC of itself and destination MAC of PC1.

Similarly same processs is done at PC2 end to get the IP address resolve to MaC address. ARP request is broadcast from PC2 for destination Mac address of 10.10.2.1 and unicast packet with required details is received from R1 .

Below is Wireshark capture for PC2 for ARP frame (for broadcast and unicast ) for reference.

PC2 – Broadcast Frame

PC2- Unicast Frame

Thus PC1 and PC2 are now aware of the respective gateway hardware address. R1 now being too aware of PC1 and PC2 MAC address thus makes communication possible between PC1 and PC2

Share this:

Like this:

Get Trained on the AWS Cloud

AWSome Day Online Conference is a free, online training event that will provide a step-by-step introduction to the core AWS services for compute, storage, database and networking. AWS technical experts will explain key features and use cases, share best practices, walk through technical demos, and be available to answer your questions one-on-one.

Based on the AWS Essentials Course, AWSome Day is ideal for IT managers, business leaders, system engineers, system administrators, developers and architects who are eager to learn more about cloud computing and how to get started on the AWS Cloud.

Share this:

Like this:

A tuple is similar to a list. The difference between the two is that we cannot change the elements of a tuple once it is assigned whereas in a list, elements can be changed. A tuple is created by placing all the items (elements) inside a parentheses ()

We generally use tuple for different datatypes and list for homogeneous similar datatypes.

Since tuple are immutable, means value can not be changed.

Tuples that contain immutable elements can be used as key for a dictionary. With list, this is not possible.

If you have data that doesn’t change, implementing it as tuple will guarantee that it remains write-protected.

Empty tuples are constructed by an empty pair of parentheses; a tuple with one item is constructed by following a value with a comma (it is not sufficient to enclose a single value in parentheses)

CODE:

OUTPUT:

5 .Dictionary

Python dictionary is an unordered set of key:value pairs , with the requirement that the keys are unique (within one dictionary). A pair of braces creates an empty dictionary: {}.Dictionary have no concept of order among elements.

Keys are unique within a dictionary while values may not be.The values of dictionary can be any type ,but the keys must be of an immutable such as strings,numbers or tuples.

Like this:

Let’s start with Python basics, with the help of program .Theory part in posts is just enough to understand the program.

Python Data Type:

Numbers

Strings

List

Tuple

Dictionary

Numbers :

Int 1 ,10,-145, 22

Float 1.1,0.9,-29.9

Complex 1.4j, 4e+6j

Strings

Way to remember how slices work in string is to think of the indices as pointing between characters, with the left edge of the first character numbered 0. Then the right edge of the last character of a string of n characters has index n, for example:

“Crazyouters ” represented in indices form

0

1

2

3

4

5

6

7

8

9

10

11

C

r

a

z

y

r

o

u

t

e

r

s

-11

-10

-9

-8

-7

-6

-5

-4

-3

-2

-1

0

Program Code : Str.py

Output

There are special operators in strings

Program Code : str1.py

Output

3. List

The list is a most versatile datatype available in Python which can be written as a list of comma-separated values (items) between square brackets. Important thing about a list is that items in a list need not be of the same type. Unlike string ,List is mutable type means its content can be changed.

Program Code : list.py

output :

Share this:

Like this:

Automation is need of Time.We as network engineers have to go with automation to simplify major chunk of the work done by us.We can not escape from automation.I will be having series of Python posts starting from basics.I will try to put all learning in post in most easiest way.

Share this:

Like this:

How should Fail over need to be implemented if CPE router is common for
primary and secondary link ? Answer for the same can be found in this post.
This scenario may be refer as DPDLSC (DUAL POP DUAL LAST MILE SINGLE CPE)
Just to mention that traffic control is being done from CPE,ISP is very
much transparent and is not influencing traffic in this scenario.