09-24-2009, 12:40 PM
========================================
# Generated by dhcpcd for interface eth0
search localdomain
nameserver 192.168.222.2
root@slax:~# cat /proc/net/dev | grep ":" | grep -v lo | grep -v sit | cut -d ": " -f 1 | tr -d " "
eth0
root@slax:~# ifconfig eth0 |egrep -o "addr:[0-9.]+" | cut -b 6-
192.168.222.129
root@slax:~# ifconfig eth0 |egrep -o Mask:[0-9.]+ | cut -b 6-
255.255.255.0
root@slax:~# route -n |grep eth0 |grep UG | tr -s " " |cut -d " " -f 2
192.168.222.2
root@slax:~# ping google.com
PING google.com (74.125.45.100) 56(84) bytes of data.
64 bytes from yx-in-f100.google.com (74.125.45.100): icmp_seq=1 ttl=128 time=254 ms
64 bytes from yx-in-f100.google.com (74.125.45.100): icmp_seq=2 ttl=128 time=258 ms
64 bytes from yx-in-f100.google.com (74.125.45.100): icmp_seq=3 ttl=128 time=251 ms
^Z
[1]+ Stopped ping google.com
root@slax:~#
==================================================
ini kok bisa ya.... pake nat
# Generated by dhcpcd for interface eth0
search localdomain
nameserver 192.168.222.2
root@slax:~# cat /proc/net/dev | grep ":" | grep -v lo | grep -v sit | cut -d ": " -f 1 | tr -d " "
eth0
root@slax:~# ifconfig eth0 |egrep -o "addr:[0-9.]+" | cut -b 6-
192.168.222.129
root@slax:~# ifconfig eth0 |egrep -o Mask:[0-9.]+ | cut -b 6-
255.255.255.0
root@slax:~# route -n |grep eth0 |grep UG | tr -s " " |cut -d " " -f 2
192.168.222.2
root@slax:~# ping google.com
PING google.com (74.125.45.100) 56(84) bytes of data.
64 bytes from yx-in-f100.google.com (74.125.45.100): icmp_seq=1 ttl=128 time=254 ms
64 bytes from yx-in-f100.google.com (74.125.45.100): icmp_seq=2 ttl=128 time=258 ms
64 bytes from yx-in-f100.google.com (74.125.45.100): icmp_seq=3 ttl=128 time=251 ms
^Z
[1]+ Stopped ping google.com
root@slax:~#
==================================================
ini kok bisa ya.... pake nat
Satu2nya kekurangan gw adalah gw ga punya kelebihan....



