# Proxy settings

## sebgarden

Hello !

One other simple problem: I cannot ping the proxy of my university. I set up my proxy like it is advised in the installation guide, it means that my configuration is the following:

```

# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0C:6E:D7:A3:B4  

          inet addr:172.20.208.173  Bcast:172.20.208.255  Mask:255.255.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:8177 errors:54744 dropped:54744 overruns:50507 frame:0

          TX packets:78 errors:0 dropped:0 overruns:0 carrier:41

          collisions:0 txqueuelen:100 

          RX bytes:725340 (708.3 Kb)  TX bytes:4992 (4.8 Kb)

          Interrupt:17 Base address:0xcf80 Memory:fe9e0000-fea00000 

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:110 errors:0 dropped:0 overruns:0 frame:0

          TX packets:110 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:10511 (10.2 Kb)  TX bytes:10511 (10.2 Kb)

#cat /etc/hostname

idk-002c307-d

#hostname

idk-002c307

#cat /etc/nisdomainname

id.uni-karlsruhe.de

#nisdomainname

(none)

# cat /etc/domainname

id.uni-karlsruhe.de

# domainname

(none)

# cat /etc/resolv.conf

domain id.uni-karlsruhe.de

nameserver 129.13.64.5

nameserver 129.13.96.2

#cat /etc/hosts

127.0.0.1  localhost

172.20.208.173  idk-002c307-d.id.uni-karlsruhe.de  idk-002c307-d

```

end of /etc/profile:

```

export http_proxy="www-cache.rz.uni-karlsruhe.de:3128"

export ftp_proxy="www-cache.rz.uni-karlsruhe.de:3128"

export RSYNC_PROXY="www-cache.rz.uni-karlsruhe.de:3128"

```

eth0 and the gateway at startup come to life as it should be but with this configuration, I cannot ping the proxy and consequently of course, cannot emerge anything ...

Does someone see something wrong in here ?

Regards,

Sébastien.

----------

## sebgarden

Some other info here:

```

# route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

172.20.0.0      0.0.0.0         255.255.0.0     U     0      0        0 eth0

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

0.0.0.0         172.20.254.254  0.0.0.0         UG    1      0        0 eth0

```

----------

## think4urs11

Hi!

Your broadcast address doesn't match with network mask and network.

HTH

T.

----------

## sebgarden

What do you mean ? Could you explain more please ?

Sébastien

[EDIT]: I tried with your indication to change the broadcast to 172.20.255.255 but I was not able to ping the proxy and not even ping my neyghour's computer, which is on the same subnet (we are living in the same residence which has a hub inside the university's network).Last edited by sebgarden on Thu Nov 20, 2003 10:42 pm; edited 1 time in total

----------

## think4urs11

eth0      Link encap:Ethernet  HWaddr 00:0C:6E:D7:A3:B4 

          inet addr:172.20.208.173  Bcast:172.20.208.255  Mask:255.255.0.0

according to broadcast address -> network is 172.20.208.0 / 24

gateway is 172.20.254.254 - means annother subnet, not your own

according to network mask -> network would be 172.20.0.0, address is 172.20.208.173, broadcast address is totally wrong in this case

correct could be (if all infos are correct you gave)

your ip: 172.20.208.173

your mask: 255.255.0.0

your broadcast: 172.20.255.255

your gateway: 172.20.254.254

clearer now?

----------

## sebgarden

 *Think4UrS11 wrote:*   

> eth0      Link encap:Ethernet  HWaddr 00:0C:6E:D7:A3:B4 
> 
>           inet addr:172.20.208.173  Bcast:172.20.208.255  Mask:255.255.0.0
> 
> according to broadcast address -> network is 172.20.208.0 / 24
> ...

 

Thank you for this networking course explication Think4UrS11.

Well, the fact is that my other computer on which I'm typing this message is working well with this broadcast adress. So maybe it's wrong but it's not the only problem that I have then  :Laughing: 

ping 172.20.254.254 gives me the classical "Destination host unreachable"

Regards,

Sébastien.Last edited by sebgarden on Thu Nov 20, 2003 10:55 pm; edited 1 time in total

----------

## think4urs11

thats the difference between 'working somehow' and 'installed correctly'

the dest. unreachable is perfectly ok with your setup

change your broadcast address and you will be able to reach the gateway  :Smile: 

----------

## sebgarden

 *Think4UrS11 wrote:*   

> thats the difference between 'working somehow' and 'installed correctly'
> 
> the dest. unreachable is perfectly ok with your setup
> 
> change your broadcast address and you will be able to reach the gateway 

 

If it could be so simple ...

----------

## think4urs11

firewall in between which drops icmp?

what gives you e.g. a wget http://www.gentoo.org/index.html ?

... of course you should set your http/ftp-proxy + user/passwd correct for this

----------

## sebgarden

```

# wget http://www.gentoo.org/index.html

--00:15:09-- http://www.gentoo.org/index.html

=> 'index.html'

Resolving www-cache.rz.uni-karlsruhe.de... failed: Host not found

```

----------

## sebgarden

```

# wget http://www.gentoo.org/index.html

--00:15:09-- http://www.gentoo.org/index.html

=> 'index.html'

Resolving www-cache.rz.uni-karlsruhe.de... failed: Host not found

```

I think we have a firewall in the residence with strict restrictions but we don't need a password/username.

----------

## think4urs11

which version of wget? 1.9 and higher require you to set HTTP_PROXY and FTP_PROXY - no longer the non-capitalized http_proxy/ftp_proxy

Nevertheless - your ip settings are at least a little bit strange   :Twisted Evil: 

HTH and good night

T.

----------

## sebgarden

 *Think4UrS11 wrote:*   

> which version of wget? 1.9 and higher require you to set HTTP_PROXY and FTP_PROXY - no longer the non-capitalized http_proxy/ftp_proxy

 

Wrong, I have the 1.9 version on my laptop and it works well with small letters. Setting the proxy both in /etc/wget/wgetrc and /etc/profile shouldn't help but it is still what I wrote in /etc/wget/wgetrc:

```

export http_proxy = http://www-cache.rz.uni-karlsruhe.de:3128/

export ftp_proxy = http://www-cache.rz.uni-karlsruhe.de:3128/

```

and here is the code found in /etc/profile:

export http_proxy="www-cache.rz.uni-karlsruhe.de:3128"

export ftp_proxy="www-cache.rz.uni-karlsruhe.de:3128"

export RSYNC_PROXY="www-cache.rz.uni-karlsruhe.de:3128"

[/code]

Why didn't I wrote the same thing in both ?

Because I don't know which format is the good one and so I just conserved the original syntax found in each file. But I think it's equivalent.

 *Quote:*   

> 
> 
> Nevertheless - your ip settings are at least a little bit strange  
> 
> HTH and good night
> ...

 

I maybe go to bed ... or maybe not. I'm still hacking around to get a working computer. Still no luck for the network though and the sun almost begans to shine in the sky ...  :Smile: 

Anyway, thanks for the help.

Regards,

Sébastien.

----------

## fleed

I think even though the broadcast is wrong, the gateway looks fine, it's part of your subnet. According to your ifconfig, your subnet is:

172.20.0.0

So 172.20.254.254 is part of that so you should be able to ping it directly. Could it be the host is not accepting pings?

You mentioned you get destination host unreachable, is that when you use the other computer which has the same settings? 

I don't know that much about networking in linux, but I thought that the broadcast address was not used to determine the subnet since there's really no way to get the netmask from the broadcast in all cases.  I could be horribly wrong though. But if I'm right, then how does the broadcast influence the rest of the network if it's not doing broadcasting? (I really would like to know, get more networking knowledge and all that, Think4UrS11 knows a lot!)

----------

## DuDe

Hi seb, i have in my company a proxy, for to do work proxy and gentoo i had to add some info about proxy, userid and password in wgetrc and not exported via variables. 

the part of wgetrc are 

```

http_proxy = http://your Ip of httpproxy:port

ftp_proxy = http://your Ip of httpproxy:port

proxy_user = your user name

proxy_passwd = your password 

```

Obviusly if you dont have to login in proxy, via userid and password, you simply non add proxy_user and proxy_password

----------

