SOLARIS
NETWORKING-2
What we are going to Learn,
·
Ifconfig intersection
·
Dladm
·
Inetadm / inetconv
·
Enable / Disable Net Services via inetadm
·
Network Services Default Properties
·
Modify Default Network Services Properties
·
Individual Network Services Properties
·
Modify Individual Network Services Properties
Let’s start with Network Interface,
root@sol-test-4:>/# ifconfig -a
lo0:
flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232
index 1
inet 127.0.0.1 netmask
ff000000
lo0:1:
flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232
index 1
zone tzone3
inet 127.0.0.1 netmask
ff000000
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu
1500 index 2
inet 192.168.234.141
netmask ffffff00 broadcast 192.168.234.255
ether 0:c:29:89:b5:98
e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
mtu 1500 index 2
zone tzone3
inet 192.168.234.205 netmask
ffffff00 broadcast 192.168.234.255
lo0, e1000g0, e1000g0:1 are the names of interface based on the
drivers attached, e.g.… e1000g0 is used for Intel’s Gigabit Ethernet Hardware,
e1000g0 is First Interface, e1000g0:1 is First Virtual Interface,
If there were other Physical Interfaces then it will be
e1000g1, e1000g2 … … …
lo0 … This is loopback Interface, Loopback interface is used by
systems to connect itself even there is no Network interface present on system.
It’s virtual in nature, we can see that in Flags section also.
127.0.0.1 is the IPv4 address which is reserved for loopback address.
INTERSECTION OF IFCONFIG O/P
UP This
Ethernet card is up (Maintenance mode can be up or down)
BROADCASTING Card is
broadcasting its presence on the network, using
Broadcast
packets
RUNNING The
Ethernet card is running.
MULTICAST This Ethernet card accepts multicast
addresses. A multicast address sends Ethernet packets to multiple computers at
the same time, hence the name multi (several) cast (send). This is a special
Class D address.
IPv4 Using IPv4. This is the standard
"xxx.xxx.xxx.xxx" type of address
mtu
1500 Maximum
Transmission Unit, the size of the Ethernet packet that this system will take.
index Shows
how many Ethernet devices are using this setting.
inet The IP
address of the Ethernet card.
netmask This shows the netmask in hexadecimal
numbers.
broadcast The
broadcast address this system uses. When the system needs to contact other
computers on the same network, it uses a broadcast address.
ether The
Ethernet address (MAC) of the NIC card.
==============
dladm
data link interfaces administration
root@sol-test-1:>/# ifconfig -a |grep
"^e1000f*"
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu
1500 index 2
e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
mtu 1500 index 2
e1000g0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
mtu 1500 index 2
e1000g0:3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
mtu 1500 index 2
We have 1 physical and 3 virtual interfaces showing here, but I know
that there are more physical interfaces are connected with this system… Where
are they?
Here u go…
root@sol-test-1:>/# dladm show-link
e1000g0 type:
non-vlan mtu: 1500 device: e1000g0
e1000g1 type:
non-vlan mtu: 1500 device: e1000g1
e1000g2 type:
non-vlan mtu: 1500 device: e1000g2
e1000g3 type:
non-vlan mtu: 1500 device: e1000g3
e1000g4 type:
non-vlan mtu: 1500 device: e1000g4
dladm is used to display unconfigure interfaces, Link status, speed,
Duplex, MTU, VLAN status, Network traffic status, & for link aggregation
root@sol-test-1:>/# dladm show-dev
e1000g0 link: up speed: 1000 Mbps
duplex: full
e1000g1 link: up speed: 1000 Mbps
duplex: full
e1000g2 link: up speed: 1000 Mbps
duplex: full
e1000g3 link:
unknown speed: 1000 Mbps
duplex: full
e1000g4 link:
unknown speed: 1000 Mbps
duplex: full
Only e1000g0 is configured, that’s why shown in o/p of ifconfig.
NETWORK STATS WITH dladm
root@sol-test-1:>/# dladm show-dev -s
ipackets rbytes
ierrors opackets obytes
oerrors
e1000g0 30412 2750443 0
22584 19421686 0
e1000g1 23948 2331269 0
609 38976 0
e1000g2 23877 2324818 0
614 39296 0
e1000g3 0 0 0 0 0 0
e1000g4 0 0 0 0 0 0
-s with dladm will show network traffic statistics with I/O packets
& I/O errors
REAL TIME NETWORK STAT WITH dladm
root@sol-test-1:>/# dladm show-link -s -i 10 e1000g0
ipackets rbytes
ierrors opackets obytes
oerrors
e1000g0 30779 2781019 0
22893 19451429 0
ipackets rbytes
ierrors opackets obytes
oerrors
e1000g0 54 4779 0 52 5288 0
ipackets rbytes
ierrors opackets obytes
oerrors
e1000g0 57 4884 0 54 5333 0
ipackets rbytes
ierrors opackets obytes
oerrors
e1000g0 53 4532 0 52 5206 0
ipackets
rbytes ierrors opackets
obytes oerrors
e1000g0 57 4884 0 52 5204 0
Show the network stat with interval of 10 seconds for interface e1000g0
If we failed to mention interface then it will automatically opt for
default interface whichever,
root@sol-test-1:>/# dladm show-link -s -i 2
ipackets rbytes
ierrors opackets obytes
oerrors
e1000g0 33693 3031364 0
25700 19728095 0
ipackets rbytes
ierrors opackets obytes
oerrors
e1000g0 20 1660 0 19 1931 0
ipackets rbytes
ierrors opackets obytes
oerrors
e1000g0 21
1762 0 21 2156 0
ipackets rbytes
ierrors opackets obytes
oerrors
e1000g0 19 1596 0 18 1867 0
^C
You can check the further details on How to Configure extra interface
and how to make them live & Persistent, then please check the below post.
INETADM
Before Solaris 10, the network services are controlled by inetd
daemon and configured by editing /etc/inetd.conf file.
Now SMF (Service Management Facility) is in charge for all services
on system.
So what is this inetd and what is the significance of this in current
scenario, when we have svcadm for controlling all services on System.
In Solaris 10 inetd is converted to Solaris Management Facility
delegated restarter for internet services,
What is Restarter?
In SMF framework a process or service that is responsible for
monitoring & restarting other services are restarter, here we have
“svc.startd” master restarter, which uses a model of delegated restarter for
some services which work for svc.startd, but the delegated restarter is bound
to pass any changes in any service they manage to svc.startd.
The current inetd cannot be run from outside the SMF, means it cannot
be run from the command line as it was in previous versions, it must pass the
changes to svc.startd
The only delegated restarter currently is “inetd” which manages
network services.
OK… Let’s have a scenario… we need to add a third party software
service, but it can be used only when it will be under SMF,
To use that service we need to edit the /etc/inetd.conf file with
service details and run the “inetconv” command without options.
It will re-read the /etc/inetd.conf file and converts any entry to
services that run under SMF.
#inetconv
So… what is concluded?
Inetd services are also SMF services, so we can use SMF commands as
well as inetadm commands to manage Network Services.
Besides that, inetadm has some special features provided to alter the
Net services behavior.
List all Network Services
root@sol-test-1:>/# inetadm
ENABLED STATE FMRI
enabled online svc:/application/x11/xfs:default
disabled disabled svc:/application/x11/xvnc-inetd:default
enabled online
svc:/application/font/stfsloader:default
enabled offline svc:/application/print/rfc1179:default
enabled online svc:/network/rpc/gss:default
enabled online svc:/network/rpc/rstat:default
enabled online svc:/network/rpc/rusers:default
disabled disabled svc:/network/rpc/spray:default
disabled disabled svc:/network/rpc/wall:default
enabled online svc:/network/rpc/mdcomm:default
enabled online svc:/network/rpc/meta:default
enabled online svc:/network/rpc/metamed:default
======================O/P REMOVED==========================
Enable / Disable Net Services via inetadm
root@sol-test-1:>/# inetadm |grep -i ftp
enabled online svc:/network/ftp:default
root@sol-test-1:>/# inetadm -d ftp
root@sol-test-1:>/# inetadm |grep -i ftp
disabled disabled svc:/network/ftp:default
root@sol-test-1:>/# inetadm -e ftp
root@sol-test-1:>/# inetadm |grep -i ftp
enabled online svc:/network/ftp:default
So we can see that inetadm –e & inetadm –d can enable and disable
the net services.
Network Services Default Properties (-p)
root@sol-test-1:>/# inetadm -p
NAME=VALUE
bind_addr=""
bind_fail_max=-1
bind_fail_interval=-1
max_con_rate=-1
max_copies=-1
con_rate_offline=-1
failrate_cnt=40
failrate_interval=60
inherit_env=TRUE
tcp_trace=FALSE
tcp_wrappers=TRUE
connection_backlog=10
Modify Default Network Services Properties (-M)
root@sol-test-1:>/# inetadm -p |grep -i tcp
tcp_trace=FALSE
tcp_wrappers=TRUE
root@sol-test-1:>/# inetadm -M tcp_trace=TRUE
root@sol-test-1:>/# inetadm -p |grep -i tcp_trace
tcp_trace=TRUE
Individual Network Services Properties (-l)
root@sol-test-1:>/# inetadm -l tcp
SCOPE NAME=VALUE
name="100083"
endpoint_type="tli"
proto="tcp"
isrpc=TRUE
rpc_low_version=1
rpc_high_version=1
wait=TRUE
exec="/lib/svc/method/rpc-ttdbserverd"
user="root"
default bind_addr=""
default bind_fail_max=-1
default bind_fail_interval=-1
default max_con_rate=-1
default max_copies=-1
default con_rate_offline=-1
default failrate_cnt=40
default failrate_interval=60
default inherit_env=TRUE
default tcp_trace=TRUE
default tcp_wrappers=TRUE
default connection_backlog=10
Modify Individual Network Services Properties (-m)
root@sol-test-1:>/# inetadm -l telnet |grep -i trace
tcp_trace=FALSE
root@sol-test-1:>/# inetadm -m telnet tcp_trace=TRUE
root@sol-test-1:>/# inetadm -l telnet |grep -i trace
tcp_trace=TRUE
No comments:
Post a Comment