Thursday, October 27, 2005

netstat alternative to arp -a

netstat -pn

Saturday, October 15, 2005

ping response if no route

"ICMP Host Unreachable from gateway"

Check rdisc adverts lifetime (2)

1) router : pkill -9 in.routed
2) host :
while true
do
date
netstat -rn | grep default
sleep 20
done

snoop not to resolve names flag

snoop -r

rdisc advertisements lifetime to 135 sec

/etc/gateways :
rdisc_interval=45
* lifetime = interval*3
* default lifetime is 30 mins, which is not appropriate

Protocol for router advertisements

icmp

snoop router advertisements

snoop -d eri0 icmp

Friday, October 14, 2005

Number of IP addresses on a subnet

255.255.255.224
256 - 224 = 32 IP addresses (but only 30 hosts)
* first IP is the address of the network itself
* last IP is the broadcast address

Sol 10 : enable ipv4-forwarding

routeadm -e ipv4-forwarding

Two conditions to become a router

1) no /etc/defaultrouter
2) ip_forwarding is not explicitly disallowed
    * In Sol 9, touch /etc/notrouter. In Sol 10, "routeadm -d ipv4-forwarding"

To start in.rdisc as a router rather than a host

/usr/sbin/in.rdisc -r
* -r for router

To force in.routed advertise routing table

/usr/sbin/in.routed -s
* -s for "supply" others. -s is default if multi-homed and ip_forwarding 1

What's supernetting?

Combining several contiguous networks into one (same as CIDR)

Purpose of ICMP redirect

Carlos asks me to give paper to Josue when he can do it him himself.
I give him an ICMP redirect with "do it yourself"

Why disable ICMP redirect?

Carlos can lie to me to go through Josue

To disable ICMP redirect

Startup script:
/usr/sbin/ndd -set /dev/ip ip_ignore_redirect 1

RIP "route poisoning"

When a router is down, an update with hop-count of 16 is sent.
16 is unreachable, so the entry is removed.

RIP "split horizons"

Never send information about a route back from where it came from.
Prevents two-node loops.

RIP "hold-down state"

When a router is down, wait with any changes for some time.
This prevents correct and incorrect routes from being advertised simultaneously.

Purpose of in.rdisc

sends and receives default router adverts

Main advantage of RDISC

It is routing protocol independent - for every routing advertisement it adds a default route entry

To advertise a default route by multicast

in.rdisc -r
* -r is "router"

By default, in.rdisc sends out adverts every

600 sec (10 min)

in.rdisc in Solaris 10

is incorporated in in.routed. Start in.rdisc manually once, and in.routed will take over.

Route to Multicast

route add 224.0/4 `uname -n` -interface

Remove all gateway entries from route table

route flush

View route table changes in real-time

route monitor

Change default route to be "blade"

route change default blade

List info on default route

route get default

Config file for in.routed

/etc/gateways

Config in.routed for no rip in, no rip out, or both on eri0

/etc/gateways :
noripin    eri0
noripout  eri0
norip        eri0

Thursday, October 13, 2005

Define static default route in

/etc/defaultrouter

Why define several default routers?

If /etc/defaultrouter has several routers, one can fail

To prevent in.routed and in.rdisc from starting

/etc/defaultrouter or /etc/notrouter exist

Disadvantage of static default route

/etc/defaultrouter file must be edited locally on every system - not possible on growing networks.

Name 192.168.2 "home-net" with "home" alias

/etc/inet/networks :
home-net     192.168.2     home

Route to "home" through 192.168.2.2 gateway

route add net home 192.168.2.2

Route to "home" through 192.168.2.2 on local iface

route add net home 192.168.2.2 -interface

Order in which route table is searched (3)

1. Exact IP
2. Same network
3. Default router

Difference between a frame and a packet

frame does not go over a router
packet does

EGP stands for

Exterior Gateway Protocol

EGP is used

between autonomous systems (ISPs)

EGP includes

BGP (Border Gateway Protocol)

IGP stands for

Interior Gateway Protocol

IGP is used for

within autonomous systems (universities, companies, etc.)

IGP includes

RIP and OSPF

Route table - flag D

Dynamic entry from ICMP redirect

Route table - flag H

Host

Route table - flag G

Gateway is next stop

Route table - flag U

iface is UP

Wednesday, October 12, 2005

Dynamic routing daemons start at run level

2

Two daemons for dynamic route table

in.rdisc
in.routed

IPv6 routing daemon equivalents

in.ndpd instead of in.rdisc
in.ripngd instead of in.routed