![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| IP Networking Questions involving TCP/IP, Routers, Hubs, Network protocols, etc go here. |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding new Route | jaygamini | SUN Solaris | 1 | 05-28-2008 01:14 PM |
| Adding an extra route to the ip routing table | Japie89 | IP Networking | 2 | 10-18-2007 04:16 PM |
| Adding Route in AIX | Docboyeee | IP Networking | 1 | 11-11-2002 11:07 AM |
| Route Adding | Hordak | UNIX for Dummies Questions & Answers | 1 | 10-31-2002 06:57 AM |
| trace route command | jhale123 | UNIX for Dummies Questions & Answers | 7 | 05-28-2002 05:34 PM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
need help on route command (adding)
Hi,
I was window OS user and kinda switched to darwin-bash/Mac OS recently, just asking for some help for setting up routes. When i was using in window XP i can do "route print" and "route add 64.25.55.200 mask 255.255.255.255 188.17.145.178" ,and then when i access 64.25.55.200, it will route through 188.17.145.178 gateway. So here I am asking how to do similar thing through Mac OS/Darwin-bash terminal? I am asking this because the example for unix i see on the website is like the following: # route add 192.168.1.100 10.0.0.1 add host 192.168.1.100: gateway 10.0.0.1 so i dont need to give any "mask" like route add 64.25.55.200 mask 255.255.255.255 188.17.145.178 in windows?? I tried netstat command in unix and did not see the netmask section. I wonder how to display it out. In windows i typed netstat print , it looks like Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.100 30 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 but in unix i typed netstat -nr , it looks like Destination Gateway Flags Refs Use Netif Expire default 10.0.0.1 UGS 2 146537336 fxp0 127.0.0.1 127.0.0.1 UH 0 3414961 lo0 10.0.0.1/26 link#1 UC 0 0 fxp0 10.0.0.2 00:02:b3:4c:65:27 UHLW 0 255732 lo0 10.0.0.1 00:02:7d:cc:3d:00 UHLW 1 0 fxp0 1087 how can i display the netmask section? and why Gateway is 00:02:7d:cc:3d:00 ??? isnt gateway should be like ip address format??? i am a bit confused and if any mac professionals plz help me >_< out ![]() |
| Forum Sponsor | ||
|
|
|
|||
|
err, to have a netmask of 255.255.255.0 if you want a netmask of 255.255.255.255 (single ip) just use
route add 10.10.10.10 gw 11.11.11.11 edit; another note, to just list routes type only route Last edited by sonicx : 12-04-2007 at 11:38 AM. Reason: forgot |
|||
| Google UNIX.COM |