Wise people learn when they can; fools learn when they must - Arthur Wellesley

Friday, 16 January 2015

Solaris Networking - 1

  
SOLARIS NETWORKING-1

What we are going to Learn,

·         TCP/IP Layers basic
·         ARP
·         RARP

Great,

We almost touched Major topics From SA-1 / SA-2, but we did not get in hand to hand with Networking Part of Solaris which is SA-3,

So, let’s dedicate few posts for Solaris Networking,

Well… Systems can talk with each other! Right???  Yes…   ok then,

Agreed that Systems can talk, But How?

With the help of Network they are bound with… Means Servers / Routers / Switches / Hubs / Cables / Repeaters …. Whatever

Let’s imagine a scenario where 5 systems are connected within a Network, Does they start talking like “Ooo hello… what are u doing… yes u man”

Can they talk in this manner? Even we does not communicate in such way, we follow some manner & etiquettes while communicating. So does the same thing applied on Systems? Yes!!!

They also follow some set of rules to communicate, and these rules are called “PROTOCALS”……… And one thing here to consider is the communication is based on data. So we are about to deal with “Data Communication Protocol”

“A data communication protocol is a set of rules that must be followed for two electronic devices to communicate with each other”

OK… Suppose we have to send a 1000kg bag of rice to some place, there might be several media through which we can send that like Train, Truck, Flight, etc…
Packet is ready, media is decided, Now one last question.
Does it convenient to send whole 1000kg bag or it will be better if we make 10, 100kb bags of that?

Obviously 10… 100kb bags are preferred over 1… 1000kg bag.

Let’s assume the same scenario for our case,

1000kb bag is data we want to send
Trains, Truck, Airplane are Protocols
10…100kg bags   Communication is broken into smaller processes

There are many Protocols that support data com, A communication architecture is formed by them which is also known as Protocol Stack,

Solaris uses TCP/IP model for its data communication, and obviously it’s a Protocol Stack.

TCP/IP model is a layered architecture, and each layer has specific function which is needed to be performed sequentially for successful data communication.
                               
                           TCP/IP NETWORK MODEL
   
     Layer
                  Description

APPLICATION
=It defines that how the data will be      represented in network
=Manages user applications program & network services
Examples-DNS, FTP, HTTP, TELNET, NIS, NFS……

TRANSPORT
=Manages the connection between applications
=Ensures that message reach the correct application by using TCP (connection oriented) / UDP (Connectionless) Protocols.

INTERNET
=Manages data addressing and delivery between networks
=Fragments data for the Network Interface layer

Examples- IP, ARP, RARP, ICMP

NETWORK INTERFACE
= Manages the delivery of data across the physical network
= Provides error detection and packet framing

Examples- ETHERNET, PPP, Token-Ring, FDDI

HARDWARE
=Describes the Physical connectivity of Network

   
Hey NITA…. Just to remember the Layers Name, from bottom to up.

I really apologize that I am unable to write such long explanations about working of each layer,

RESOLUTION PROTOCOLS

ARP        ADDRESS RESOLUTION PROTOCOL
RARP       REVERSE ADDRESS RESOLUTION PROTOCOL

Before explaining both I just need to say one line,
“Hey… I have something and I want something in return of that”


 That line will explain both,

ARP  = IP to MAC resolution
RARP = MAC to IP resolution

Suppose there are 50 Systems on the network, and the packet is intended for 192.168.234.200 so it will be broadcasted over the network that this packet is for said Ip, everybody will receive and process that packet, but only the correct recipient will revert with its MAC address, the mac info will be stored in to the ARP table of initiator system.

Let’s see some ARP tables,

root@sol-test-1:>/# arp -a
Net to Media Table: IPv4
Device   IP Address               Mask      Flags      Phys Addr
------ -------------------- --------------- -------- ---------------
e1000g0 192.168.234.1        255.255.255.255          00:50:56:c0:00:08
e1000g0 sol-tst-2            255.255.255.255 o        00:0c:29:b4:6d:08
e1000g0 sol-test-1           255.255.255.255 SPLA     00:0c:29:c2:8f:90
e1000g0 192.168.234.139      255.255.255.255 o        00:0c:29:f3:2a:c7
e1000g0 192.168.234.206      255.255.255.255 SPLA     00:0c:29:c2:8f:90
e1000g0 192.168.234.211      255.255.255.255 SPLA     00:0c:29:c2:8f:90
e1000g0 192.168.234.209      255.255.255.255 SPLA     00:0c:29:c2:8f:90
e1000g0 224.0.0.0            240.0.0.0       SM       01:00:5e:00:00:00

sol-test-1 has details of almost all systems present on network,

root@sol-test-4:>/# arp -a
Net to Media Table: IPv4
Device   IP Address               Mask      Flags      Phys Addr
------ -------------------- --------------- -------- ---------------
e1000g0 192.168.234.1        255.255.255.255          00:50:56:c0:00:08
e1000g0 192.168.234.133      255.255.255.255 o        00:0c:29:c2:8f:90
e1000g0 sol-test-4           255.255.255.255 SPLA     00:0c:29:89:b5:98
e1000g0 192.168.234.205      255.255.255.255 SPLA     00:0c:29:89:b5:98
e1000g0 224.0.0.0            240.0.0.0       SM       01:00:5e:00:00:00

sol-test-4 has less entries than previous one (sol-test-1), OK …. Let’s ping a system and see does it modify its ARP table or not?

root@sol-test-4:>/# ping 192.168.234.134
192.168.234.134 is alive

root@sol-test-4:>/# arp -a
Net to Media Table: IPv4
Device   IP Address               Mask      Flags      Phys Addr
------ -------------------- --------------- -------- ---------------
e1000g0 192.168.234.1        255.255.255.255          00:50:56:c0:00:08
e1000g0 192.168.234.134      255.255.255.255          00:0c:29:b4:6d:08
e1000g0 192.168.234.133      255.255.255.255 o        00:0c:29:c2:8f:90
e1000g0 sol-test-4           255.255.255.255 SPLA     00:0c:29:89:b5:98
e1000g0 192.168.234.205      255.255.255.255 SPLA     00:0c:29:89:b5:98
e1000g0 224.0.0.0            240.0.0.0       SM       01:00:5e:00:00:00

Now 192.168.234.134 is updated in ARP table of sol-test-4

This way ARP table is build,

What does the following field stand for?

Device   IP Address               Mask      Flags      Phys Addr

Device     Interface of the system from which the system is connected to network

IP Addr    The IP address or host name of the system to which this entry applies

Mask       This indicates whether the entry refers to a host or the multicast address range

Flags      S    Static entry
P    Published entry, A system can be configured to advertise an ARP entry on behalf of systems that cannot respond to ARP requests
M    Mapped entry. This is used for the 224.0.0.0 multicast entry only
U    unresolved or incomplete entry

Phys Addr  MAC address for the entry


We can also add static entries to ARP table,

#arp -s hostname ethernet_address

root@sol-tst-2:>/# arp -a |grep 200


Nothing in O/P,

root@sol-tst-2:>/# arp -s rh-server 00:0c:29:f3:2a:bd
arp: rh-server: unknown host

Add the entry of rh-server to /etc/hosts

root@sol-tst-2:>/# vi /etc/hosts

192.168.234.200 rh-server

wq!

root@sol-tst-2:>/# arp -s rh-server 00:0c:29:f3:2a:bd

root@sol-tst-2:>/# arp -a |grep rh
e1000g0 rh-server            255.255.255.255 S        00:0c:29:f3:2a:bd


RARP

Now I know MAC address and I want to know IP from MAC

One of the Best Example of RARP is While Jumpstart Installation

By default Open Boot PROM (OBP) is configured to use RARP as the network boot strategy.

/etc/ethers
/etc/hosts

Supports MAC to IP resolution, /etc/ethers does not present by default, it needs to be created “Created on Boot Servers Only”

root@sol-test-1:>/# cat /etc/ethers
00:0c:29:b4:6d:08 sol-tst-2
00:0c:29:89:b5:98 sol-test-4

DAEMON,

root@sol-test-1:>/# svcs -a |grep -i rarp
disabled       Dec_29   svc:/network/rarp:default

root@sol-test-1:>/# svcadm restart svc:/network/rarp:default

root@sol-test-1:>/# svcs -a |grep -i arp
online         19:12:32 svc:/network/rarp:default

root@sol-test-1:>/# ps -ef |grep -i arp
    root  5270  5204   0 19:15:25 pts/2       0:00 grep -i arp
    root  5264     1   0 19:12:32 ?           0:00 /usr/sbin/in.rarpd –a

/usr/sbin/in.rarpd is daemon

The in.rarpd RARP daemon must be running on systems that provide RARP responses to requests

No comments:

Post a Comment