This project is read-only.

Can I set the default gateway manually?

Mar 18, 2010 at 5:53 PM

Hi ,

 

I'd like to set the Default Gateway Manually. How can I do this?

 

Thanks

Mar 18, 2010 at 5:57 PM

Are you referring to the "Remote Default Gateway" checkbox on VPN connections?

Mar 18, 2010 at 6:03 PM

I just want to create a Dial Up connection with a Mobile phone as a modem using a RasEntry object as follows:

 

 

 Dim entry As RasEntry = RasEntry.CreateDialUpEntry(device.Name, "*99***10#", device)
                    'entry.Options = RasEntryOptions.RemoteDefaultGateway
                    entry.IPAddress = IPAddressToNumber("10.225.1.52")
                    entry.DnsAddress = IPAddressToNumber("172.18.32.100")
                    entry.DnsAddressAlt = IPAddressToNumber("172.16.32.142")
                    'entry.NetworkProtocols = RasNetworkProtocols.IP
                    'entry.Options = RasEntryOptions.SoftwareCompression
                    'entry.AlternatePhoneNumbers = alternate3
                    entry.RedialCount = 0
                    entry.RedialPause = 1
                    entry.IdleDisconnectSeconds = 0
                    pbk.Entries.Add(entry)

 Dim entry As RasEntry = RasEntry.CreateDialUpEntry(device.Name, "*99***10#", device)

 

                    entry.IPAddress = IPAddressToNumber("10.225.1.52")

                    entry.DnsAddress = IPAddressToNumber("172.18.32.100")

                    entry.DnsAddressAlt = IPAddressToNumber("172.16.32.142")

                    entry.RedialCount = 0

                    entry.RedialPause = 1

                    entry.IdleDisconnectSeconds = 0

                    pbk.Entries.Add(entry)

But when I am doing a DialAsync(), once I am connected I have no DNS or Gateway set. And Also the IP address provided is not the static one I want to use.  

 

Mar 18, 2010 at 6:15 PM

to be more specific, when the  entry is created within the phonebook, It creates a Dial-Up connection where the IP address and the DNS server is provided dynamically. So what Am I doing wrong?

 

About the default gateway, I've just realized how to fix it. 

Mar 18, 2010 at 7:12 PM

The help file included with the SDK mentions those properties are ignored unless the entry options SpecificIPAddress flag has been set.

Check the properties on RasEntry, you should see the information in the remarks.

Mar 19, 2010 at 9:54 AM

Thanks!