On Jun 27, 1:25 pm, Komuch <kom...@--USUN-TO--komuch.pl> wrote:
> matthuwi...@gmail.com pisze:
>
> > How do I use this tool to bind to an IP address on eth1?
>
> You can use manual for ifconfig 
> example:
> ifconfig eth1 xxx.xxx.xxx.xxx broadcast yyy.yyy.yyy.yyy network
> zzz.zzz.zzz.zzz
>
> Where:
>
> xxx.xxx.xxx.xxx - is IP address
> yyy.yyy.yyy.yyy - is broadcast address of your network
> zzz.zzz.zzz.zzz - is network address
>
> > My end goal is to write a bash script that:
>
> > 1. pings another server regularly
>
> You can use ping with -c xxx option (xxx - is number of packets)
> or use: nmap -nsP x.x.x.x | grep Host (x.x.x.x - server ip address)
>
> Try hping if you want more advanced tool 
>
> > 2. if it's down, bind to the server's IP address and effectively take
> > over a website on this server
>
> > Maybe there's a tool that does this already?
>
> I don't know 
>
> > Thanks,
>
> > Matt
Thank you for this! Question though... What is the "network" option?
I actually don't have another physical nic, so the interface would be
eth0:1 (I think?)--type on my part. Here is the ifconfig outpt for
eth0 (ips have been changed slightly)
Link encap:Ethernet HWaddr 00:C0:9F:14:82:3F
inet addr:216.93.159.21 Bcast:216.93.159.127 Mask:
255.255.255.224
inet6 addr: fe80::2c0:9fff:fe14:823f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:111181552 errors:0 dropped:0 overruns:0 frame:0
TX packets:124104208 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3938277490 (3.6 GiB) TX bytes:4189971174 (3.9 GiB)
Base address:0xbc80 Memory:fc3e0000-fc400000
Is the network the netmask? I tried putting the Mask info into the
network option of ifconfig, but it returned "network: Unknown host"
Thanks again for your help!!
Matt