Saturday, July 31, 2010

Add a gateway to your routes using "route"

From your prompt do:

route add default gw <ip address of gateway ex. 10.0.0.1>

ifconfig and how to change your ethernet device ip address

The command ifconfig is your friend here. From the console, take a look at your routes:


machine:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.0.0 U 0 0 0 eth1
63.171.219.64 * 255.255.255.192 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 63.171.219.65 0.0.0.0 UG 0 0 0 eth0

Now run ifconfig:

machine:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:30:48:27:0F:5A
inet addr:63.171.219.113 Bcast:63.171.219.127 Mask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:247046 errors:0 dropped:0 overruns:0 frame:0
TX packets:19554 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19011402 (18.1 Mb) TX bytes:3264987 (3.1 Mb)
Base address:0x3000 Memory:fc200000-fc220000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4226 (4.1 Kb) TX bytes:4226 (4.1 Kb)

eth1 Link encap:Ethernet HWaddr 00:FF:22:8B:40:66
inet addr:10.0.0.1 Bcast:10.0.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:615 errors:0 dropped:0 overruns:0 frame:0
TX packets:929 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:82476 (80.5 Kb) TX bytes:83950 (81.9 Kb)

Let's change our eth1 IP Address - first, let's bring eth1 down:


machine:~$ ifconfig eth1 down

and now let's change the IP Address:

machine:~$ ifconfig eth1 10.0.1.1 netmask 255.255.0.0

And that's pretty much it!

Wednesday, July 7, 2010

Pt. Reyes


Took a trip out to Pt. Reyes over the weekend! First time ever being there - it was windy but still very nice!