Interfaces and static
Hi all
How can I declare a static method as part of an interface? None of the documentation sugests that this is not possible yet the complier wont let me put the static keyword in.
cheers
Stephen Whipp
Oh well, guess I'll just have to live with creating pointless instances then.Don't dispare:
interface Chix {
public void someMethod();
final class Dig {
private Dig() {} //not for instantiating
public static void git() {
System.out.println("oh yeah");
//Chix.Dig.git();
Similar Messages
-
Hi All,
Does anyone know why you can't declare static methods in an interface? Is there a way round this problem?
Cheers...But this won't:public class StijnsClass
public static void aMethod()
System.out.println("StijnsClass.aMethod()");
public static void main(String[] arg)
StijnsClass stijnsInstance = new StijnsSubClass();
stijnsInstance.aMethod();
System.out.println("Nothing else to say, here?");
class StijnsSubClass extends StijnsClass
public static void aMethod()
System.out.println("StijnsSubClass.aMethod()");
super.aMethod(); // Wrong!!!
}You will get:
"StijnsClass.java:21: non-static variable super cannot be referenced from a static context".
If you remove static from the subclass method definition, you will get:
"StijnsClass.java:18: aMethod() in StijnsSubClass cannot override aMethod() in StijnsClass; overridden method is static"
That's the point. You aren't extending the method; you are only hiding it. To make it work, both methods must be instance methods, ergo, static methods cannot be extended. -
Do the Interface contains static components like static methods and attribu
Do the Interface contains static components like static methods and attributes ?
>
You have to supply a bit more detail: is that Lotus
Notes API a Java API?Hmm, It's Java interface to Lotus Notes API
Does it use JNI? Perhaps it is used somewhere underneath, I do not know for sure, but I think so
Possibly the Lotus Notes
implementation keeps a
reference to those arrays, who knows?
Maybe, but I'd be really suprised if it did. I derive this thread from Lotus Notes class and provide my own "worker method", overriding Lotus API abstract one, where I reference arrays. Arrays are specific to my program and since they are private fields in thread's class Lotus Notes layer does not have any way of referencing them, nor any reason for this matter
For starters: if you zero out (set to null) your
references to those arrays
in your threads when the threads finish, there might
surface a useful
indication that you can blame Lotus Notes for this
Well, I've become deeply suspect of whether these Notes' threads do really finish :-) My method finishes for sure, but it is just a part of run() method of Lotus Notes thread. Anyway, you can always safely blame Lotus Notes for almost anything :-) -
The difference between IEEE802.1Q Native VLAN sub-interface and Physical interface?
Hello
I think the following topologies are supported for Cisco Routers
And the Physical interface also can be using as Native VLAN interface right?
Topology 1.
R1 Gi0.1 ------ IEEE802.1Q Tunneling L2SW ------ Gi0 R2
R1 - configuration
interface GigabitEthernet0.1
encapsulation dot1Q 1 native
ip address 10.0.0.1 255.255.255.0
Topology 2.
R1 Gi0 ------ IEEE802.1Q Tunneling L2SW ------ Gi0 R2
interface GigabitEthernet0
ip address 10.0.0.1 255.255.255.0
And is it ok to use the physical interface and sub-interface with dynamic routing such as EIGRP or OSPF etc?
R1 Gi 0 ---- Point to Multipoint EIGRP or OSPF ---- Gi0 R2 / R3
Gi 0.20--- Point to Point EIGRP or OSPF --- Gi0.10 R4 (same VLAN-ID)
R1 - configuration
interface GigabitEthernet0
ip address 10.0.0.1 255.255.255.0
interface GigabitEthernet8.20
encapsulation dot1Q 20
ip address 20.0.0.1 255.255.255.0
Any information is very appreciated. but if there is any CCO document please let me know.
Thank you very much and regards,
Masanobu HiyoshiHello,
The diagram is helpful.
If I am getting you correctly, you have three routers interconnected by a switch, and you want them to operate in a hub-and-spoke fashion even though the switch is capable of allowing direct communication between any of these routers.
Your first scenario is concerned with all three routers being in the same VLAN, and by using neighbor commands, you force these routers to establish targeted EIGRP adjacencies R1-R2 and R1-R3, with R1 being the hub.
Your second scenario is concerned with creating one VLAN per spoke, having subinterfaces for each spoke VLAN created on R1 as the router, and putting each spoke just in its own VLAN.
Your scenarios are not really concerned with the concept of native VLAN or the way it is configured, to be honest. Whether you use a native VLAN in either of your scenarios, or whether you configure the native VLAN on a subinterface or on the physical interface makes no difference. There is simply no difference to using or not using a native VLAN in any of your scenarios, and there is no difference to the native VLAN configuration being placed on a physical interface or a subinterface. It's as plain as that. Both your scenarios will work.
My personal opinion, though, is that forcing routers on a broadcast multi-access segment such as Ethernet to operate in a hub-and-spoke fashion is somewhat artificial. Why would you want to do this? Both scenarios have drawbacks: in the first scenario, you need to add a neighbor statement for each spoke to the hub, limiting the scalability. In the second scenario, you waste VLANs and IP subnets if there are many spokes. The primary question is, though: why would you want an Ethernet segment to operate as a hub-and-spoke network? Sure, these things are done but they are motivated by specific needs so I would like to know if you have any.
Even if you needed your network to operate in a hub-and-spoke mode, there are more efficient means of achieving that: Cisco switches support so-called protected ports that are prevented from talking to each other. By configuring the switch ports to spokes as protected, you will prevent the spokes from seeing each other. You would not need, then, to configure static neighbors in EIGRP, or to waste VLANs for individual spokes. What you would need to do would be deactivating the split horizon on R1's interface, and using the ip next-hop-self eigrp command on R1 to tweak the next hop information to point to R1 so that the spokes do not attempt to route packets to each other directly but rather route them over R1.
I do not believe I have seen any special CCO documents regarding the use of physical interfaces or subinterfaces for native VLAN or for your scenarios.
Best regards,
Peter -
Hi there,
I created a datamodel and have applied a condition to it. When I execute the interface the invalid records are captured in the E$ table but all the other valid records do not appear on the target table. I couldn't able to find the reason for this. I have applied flow and static check to the condition and the same for the table column. Im not sure why the validate records are rejected.
Any help is appreciated.
CheersHI!
Let me understand, do you want the invalid records at target table?
If you use the flow control it will keep the records at E$ and WILL NOT load it.
If you use static control, it will LOAD the data and, after that, verify what are the records with problems.
Don't use both controls at same time, it doesn't make logical sense unless when needs to validate distinct constraints at each moment.
Does it help you? -
MS NLB with ASA and Static NAT from PUP to NLB IP
Hi all,
I am trying to get MS NLB up and running. It is almost all working. Below is my physical setup.
ASA 5510 > Cat 3750X >2x ESXi 5.1 Hosts > vSwitch > Windows 2012 NLB Guest VMs.
I have two VMs runing on two different ESXi hosts. They have two vNICs. One for managment and one for inside puplic subnet. The inside puplic subnet NICs are in the NLB cluster. The inside public subnet is NATed on the ASA to a outide public IP.
192.168.0.50 is the 1st VM
192.168.0.51 is the 2nd VM
192.168.0.52 is the cluster IP for heartbeat
192.168.0.53 is the cluster IP for NLB traffic.
0100.5e7f.0035 is the cluster MAC.
The NLB cluster is using MULTICAST
I have read the doumentation for both the ASA and CAT switch for adding a static ARP using the NLB IP and NLB MAC.
For the ASA I found
http://www.cisco.com/en/US/docs/security/asa/asa84/asdm64/configuration_guide/mode_fw.html#wp1226249
ASDM
Configuration > Device Management > Advanced > ARP > ARP Static Table
I was able to add my stic ARP just fine.
However, the next step was to enable ARP inspection.
Configuration > Device Management > Advanced > ARP > ARP Inspection
My ASDM does not list ARP Inspection, only has the ARP Static Table area. Not sure about this.
For the CAT Switch I found
http://www.cisco.com/en/US/products/hw/switches/ps708/products_configuration_example09186a0080a07203.shtml
I added the both the ARP and Static MAC. For the static MAC I used the VLAN ID of the inside public subnet and the interfaces connected to both ESXi hosts.
On the ASA I added a static NAT for my outside Public IP to my inside pupblic NLB IP and vise versa. I then added a DNS entry for our domain to point to the outside public IP. I also added it to the public servers section allowing all IP traffic testing puproses.
At any rate the MS NLB is working ok. I can ping both the Public IP and the Inside NLB IP just fine from the outside. (I can ping the inside NLB IP becuase I'm on a VPN with access to my inside subnets) The problem is when I go to access a webpade from my NLB servers using the DNS or the Public IP I get a "This Page Can't Be Displyed" messgae. Now while on the VPN if I use the same URL but insied use the NLB IP and not the Public IP it works fine.
So I think there is soemthing wrong with the NATing of the Public to NLB IP even tho I can ping it fine. Below is my ASA Config. I have bolded the parts of Interest.
Result of the command: "show run"
: Saved
ASA Version 8.4(4)9
hostname MP-ASA-1
enable password ac3wyUYtitklff6l encrypted
passwd ac3wyUYtitklff6l encrypted
names
dns-guard
interface Ethernet0/0
nameif outside
security-level 0
ip address 198.XX.XX.82 255.255.255.240
interface Ethernet0/1
description Root Inside Interface No Vlan
speed 1000
duplex full
nameif Port-1-GI-Inside-Native
security-level 100
ip address 10.1.1.1 255.255.255.0
interface Ethernet0/1.2
description Managment LAN 1 for Inside Networks
vlan 2
nameif MGMT-1
security-level 100
ip address 192.168.180.1 255.255.255.0
interface Ethernet0/1.3
description Managment LAN 2 for Inside Networks
vlan 3
nameif MGMT-2
security-level 100
ip address 192.168.181.1 255.255.255.0
interface Ethernet0/1.100
description Development Pubilc Network 1
vlan 100
nameif DEV-PUB-1
security-level 50
ip address 192.168.0.1 255.255.255.0
interface Ethernet0/1.101
description Development Pubilc Network 2
vlan 101
nameif DEV-PUB-2
security-level 50
ip address 192.168.2.1 255.255.255.0
interface Ethernet0/1.102
description Suncor Pubilc Network 1
vlan 102
nameif SUNCOR-PUB-1
security-level 49
ip address 192.168.3.1 255.255.255.0
interface Ethernet0/1.103
description Suncor Pubilc Network 2
vlan 103
nameif SUNCOR-PUB-2
security-level 49
ip address 192.168.4.1 255.255.255.0
interface Ethernet0/2
shutdown
no nameif
no security-level
no ip address
interface Ethernet0/3
shutdown
no nameif
no security-level
no ip address
interface Management0/0
nameif management
security-level 100
ip address 192.168.1.1 255.255.255.0
management-only
boot system disk0:/asa844-9-k8.bin
ftp mode passive
clock timezone PST -8
clock summer-time PDT recurring
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface
object network Inside-Native-Network-PNAT
subnet 10.1.1.0 255.255.255.0
description Root Inisde Native Interface Network with PNAT
object network ASA-Outside-IP
host 198.XX.XX.82
description The primary IP of the ASA
object network Inside-Native-Network
subnet 10.1.1.0 255.255.255.0
description Root Inisde Native Interface Network
object network VPN-POOL-PNAT
subnet 192.168.100.0 255.255.255.0
description VPN Pool NAT for Inside
object network DEV-PUP-1-Network
subnet 192.168.0.0 255.255.255.0
description DEV-PUP-1 Network
object network DEV-PUP-2-Network
subnet 192.168.2.0 255.255.255.0
description DEV-PUP-2 Network
object network MGMT-1-Network
subnet 192.168.180.0 255.255.255.0
description MGMT-1 Network
object network MGMT-2-Network
subnet 192.168.181.0 255.255.255.0
description MGMT-2 Network
object network SUNCOR-PUP-1-Network
subnet 192.168.3.0 255.255.255.0
description SUNCOR-PUP-1 Network
object network SUNCOR-PUP-2-Network
subnet 192.168.4.0 255.255.255.0
description SUNCOR-PUP-2 Network
object network DEV-PUB-1-Network-PNAT
subnet 192.168.0.0 255.255.255.0
description DEV-PUB-1-Network with PNAT
object network DEV-PUB-2-Network-PNAT
subnet 192.168.2.0 255.255.255.0
description DEV-PUB-2-Network with PNAT
object network MGMT-1-Network-PNAT
subnet 192.168.180.0 255.255.255.0
description MGMT-1-Network with PNAT
object network MGMT-2-Network-PNAT
subnet 192.168.181.0 255.255.255.0
description MGMT-2-Network with PNAT
object network SUNCOR-PUB-1-Network-PNAT
subnet 192.168.3.0 255.255.255.0
description SUNCOR-PUB-1-Network with PNAT
object network SUNCOR-PUB-2-Network-PNAT
subnet 192.168.4.0 255.255.255.0
description SUNCOR-PUB-2-Network with PNAT
object network DEV-APP-1-PUB
host 198.XX.XX.XX
description DEV-APP-2 Public Server IP
object network DEV-APP-2-SNAT
host 192.168.2.120
description DEV-APP-2 Server with SNAT
object network DEV-APP-2-PUB
host 198.XX.XX.XX
description DEV-APP-2 Public Server IP
object network DEV-SQL-1
host 192.168.0.110
description DEV-SQL-1 Inside Server IP
object network DEV-SQL-2
host 192.168.2.110
description DEV-SQL-2 Inside Server IP
object network SUCNOR-APP-1-PUB
host 198.XX.XX.XX
description SUNCOR-APP-1 Public Server IP
object network SUNCOR-APP-2-SNAT
host 192.168.4.120
description SUNCOR-APP-2 Server with SNAT
object network SUNCOR-APP-2-PUB
host 198.XX.XX.XX
description DEV-APP-2 Public Server IP
object network SUNCOR-SQL-1
host 192.168.3.110
description SUNCOR-SQL-1 Inside Server IP
object network SUNCOR-SQL-2
host 192.168.4.110
description SUNCOR-SQL-2 Inside Server IP
object network DEV-APP-1-SNAT
host 192.168.0.120
description DEV-APP-1 Network with SNAT
object network SUNCOR-APP-1-SNAT
host 192.168.3.120
description SUNCOR-APP-1 Network with SNAT
object network PDX-LAN
subnet 192.168.1.0 255.255.255.0
description PDX-LAN for S2S VPN
object network PDX-Sonicwall
host XX.XX.XX.XX
object network LOGI-NLB--SNAT
host 192.168.0.53
description Logi NLB with SNAT
object network LOGI-PUP-IP
host 198.XX.XX.87
description Public IP of LOGI server for NLB
object network LOGI-NLB-IP
host 192.168.0.53
description LOGI NLB IP
object network LOGI-PUP-SNAT-NLB
host 198.XX.XX.87
description LOGI Pup with SNAT to NLB
object-group network vpn-inside
description All inside accessible networks
object-group network VPN-Inside-Networks
description All Inside Nets for Remote VPN Access
network-object object Inside-Native-Network
network-object object DEV-PUP-1-Network
network-object object DEV-PUP-2-Network
network-object object MGMT-1-Network
network-object object MGMT-2-Network
network-object object SUNCOR-PUP-1-Network
network-object object SUNCOR-PUP-2-Network
access-list acl-vpnclinet extended permit ip object-group VPN-Inside-Networks any
access-list outside_access_out remark Block ping to out networks
access-list outside_access_out extended deny icmp any any inactive
access-list outside_access_out remark Allow all traffic from inside to outside networks
access-list outside_access_out extended permit ip any any
access-list outside_access extended permit ip any object LOGI-NLB--SNAT
access-list outside_access extended permit ip any object SUNCOR-APP-2-SNAT
access-list outside_access extended permit ip any object SUNCOR-APP-1-SNAT
access-list outside_access extended permit ip any object DEV-APP-2-SNAT
access-list outside_access extended permit ip any object DEV-APP-1-SNAT
access-list outside_cryptomap extended permit ip object-group VPN-Inside-Networks object PDX-LAN
pager lines 24
logging asdm informational
mtu outside 1500
mtu Port-1-GI-Inside-Native 1500
mtu MGMT-1 1500
mtu MGMT-2 1500
mtu DEV-PUB-1 1500
mtu DEV-PUB-2 1500
mtu SUNCOR-PUB-1 1500
mtu SUNCOR-PUB-2 1500
mtu management 1500
ip local pool Remote-VPN-Pool 192.168.100.1-192.168.100.20 mask 255.255.255.0
no failover
icmp unreachable rate-limit 1 burst-size 1
icmp permit any outside
icmp permit any Port-1-GI-Inside-Native
icmp permit any MGMT-1
icmp permit any MGMT-2
icmp permit any DEV-PUB-1
icmp permit any DEV-PUB-2
icmp permit any SUNCOR-PUB-1
icmp permit any SUNCOR-PUB-2
asdm image disk0:/asdm-649-103.bin
no asdm history enable
arp DEV-PUB-1 192.168.0.53 0100.5e7f.0035 alias
arp timeout 14400
no arp permit-nonconnected
nat (Port-1-GI-Inside-Native,outside) source static any any destination static VPN-POOL-PNAT VPN-POOL-PNAT
nat (DEV-PUB-1,outside) source static any any destination static VPN-POOL-PNAT VPN-POOL-PNAT
nat (DEV-PUB-2,outside) source static any any destination static VPN-POOL-PNAT VPN-POOL-PNAT
nat (MGMT-1,outside) source static any any destination static VPN-POOL-PNAT VPN-POOL-PNAT
nat (MGMT-2,outside) source static any any destination static VPN-POOL-PNAT VPN-POOL-PNAT
nat (SUNCOR-PUB-1,outside) source static any any destination static VPN-POOL-PNAT VPN-POOL-PNAT
nat (SUNCOR-PUB-2,outside) source static any any destination static VPN-POOL-PNAT VPN-POOL-PNAT
nat (DEV-PUB-1,outside) source static DEV-PUP-1-Network DEV-PUP-1-Network destination static PDX-LAN PDX-LAN no-proxy-arp route-lookup
nat (DEV-PUB-2,outside) source static DEV-PUP-2-Network DEV-PUP-2-Network destination static PDX-LAN PDX-LAN no-proxy-arp route-lookup
nat (MGMT-1,outside) source static MGMT-1-Network MGMT-1-Network destination static PDX-LAN PDX-LAN no-proxy-arp route-lookup
nat (MGMT-2,outside) source static MGMT-2-Network MGMT-2-Network destination static PDX-LAN PDX-LAN no-proxy-arp route-lookup
nat (Port-1-GI-Inside-Native,outside) source static Inside-Native-Network Inside-Native-Network destination static PDX-LAN PDX-LAN no-proxy-arp route-lookup
nat (SUNCOR-PUB-1,outside) source static SUNCOR-PUP-1-Network SUNCOR-PUP-1-Network destination static PDX-LAN PDX-LAN no-proxy-arp route-lookup
nat (SUNCOR-PUB-2,outside) source static SUNCOR-PUP-2-Network SUNCOR-PUP-2-Network destination static PDX-LAN PDX-LAN no-proxy-arp route-lookup
object network Inside-Native-Network-PNAT
nat (Port-1-GI-Inside-Native,outside) dynamic interface
object network VPN-POOL-PNAT
nat (Port-1-GI-Inside-Native,outside) dynamic interface
object network DEV-PUB-1-Network-PNAT
nat (DEV-PUB-1,outside) dynamic interface
object network DEV-PUB-2-Network-PNAT
nat (DEV-PUB-2,outside) dynamic interface
object network MGMT-1-Network-PNAT
nat (MGMT-1,outside) dynamic interface
object network MGMT-2-Network-PNAT
nat (MGMT-2,outside) dynamic interface
object network SUNCOR-PUB-1-Network-PNAT
nat (SUNCOR-PUB-1,outside) dynamic interface
object network SUNCOR-PUB-2-Network-PNAT
nat (SUNCOR-PUB-2,outside) dynamic interface
object network DEV-APP-2-SNAT
nat (DEV-PUB-2,outside) static DEV-APP-2-PUB
object network SUNCOR-APP-2-SNAT
nat (SUNCOR-PUB-2,outside) static SUNCOR-APP-2-PUB
object network DEV-APP-1-SNAT
nat (DEV-PUB-1,outside) static DEV-APP-1-PUB
object network SUNCOR-APP-1-SNAT
nat (SUNCOR-PUB-1,outside) static SUCNOR-APP-1-PUB
object network LOGI-NLB--SNAT
nat (DEV-PUB-1,outside) static LOGI-PUP-IP
object network LOGI-PUP-SNAT-NLB
nat (outside,DEV-PUB-1) static LOGI-NLB-IP
access-group outside_access in interface outside
access-group outside_access_out out interface outside
route outside 0.0.0.0 0.0.0.0 198.145.120.81 1
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
user-identity default-domain LOCAL
http server enable
http 192.168.1.0 255.255.255.0 management
http 192.168.1.0 255.255.255.0 outside
http 10.1.1.0 255.255.255.0 Port-1-GI-Inside-Native
http 192.168.180.0 255.255.255.0 MGMT-1
http 192.168.100.0 255.255.255.0 Port-1-GI-Inside-Native
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
class-map inspection_default
match default-inspection-traffic
policy-map type inspect dns preset_dns_map
parameters
message-length maximum client auto
message-length maximum 512
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225
inspect h323 ras
inspect rsh
inspect rtsp
inspect esmtp
inspect sqlnet
inspect skinny
inspect sunrpc
inspect xdmcp
inspect sip
inspect netbios
inspect tftp
inspect ip-options
inspect icmp
inspect icmp error
service-policy global_policy global
prompt hostname context
call-home reporting anonymous
call-home
profile CiscoTAC-1
no active
destination address http https://tools.cisco.com/its/service/oddce/services/DDCEService
destination address email [email protected]
destination transport-method http
subscribe-to-alert-group diagnostic
subscribe-to-alert-group environment
subscribe-to-alert-group inventory periodic monthly
subscribe-to-alert-group configuration periodic monthly
subscribe-to-alert-group telemetry periodic daily
Cryptochecksum:d6f9f8e2113dc03cede9f2454dba029b
: end
Any help would be great! I think the issue is in teh NAT as I am able to access NLB IP from the outside and could not do that before adding the Static ARP stuff.
Thanks,
ChrisAlso If I change to NAT from the public IP to the NLB IP to use either one of the phsyical IPs of the NLB cluster (192.168.0.50 or 51) it works fine when using the public IP. So it's definatly an issue when NATing the VIP of NLB cluster.
Chris -
DNS and Static IP Address Question on Solaris v10 X86
I�ve recently installed Solaris v10 X86 and have two questions. The system is a Dell E521 with 4GB RAM and 1GB SysKonnect NIC, and internet is provided via a cable modem, that�s plugged into a Netgear router, and the Solaris 10 box is plugged into the Netgear router via a CAT5 ethernet cable.
1. I can connect to my router login page using the following URL:
http://192.168.1.1/start.htm and I can also connect to various web pages such as yahoo, if I first "ping yahoo.com" (on another machine that�s internet enabled) and then plug the web site�s ip address into the Solaris/Mozilla browser. So it appears that I haven�t been successful at pointing the Solaris x86 at a DNS server to resolve the DNS name.
2. I've purchased a commercially available software package and it requires a static ip address for this Solaris x86 server. If the ip address changes, it�ll stop working by design and require that I reacquire the license file. When connecting through this Netgear router, how do I lock this Solaris v10 x86 server into a specific ip address? (the ip address floats presently when cycling my PC�s on/off) presently, and assume the Solaris box will too, usually through an ip range of 192.168.1.<1 through 5>
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
skge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.3 netmask ffffff00 broadcast 192.168.1.255
ether 0:0:5a:9b:1f:10
# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
192.168.1.0 192.168.1.3 U 1 1 skge0
224.0.0.0 127.0.0.1 U 1 0 lo0
default 192.168.1.1 UG 1 0
127.0.0.1 127.0.0.1 UH 8 163 lo0
Some of the present Netgear router settings:
Internet IP Address
Get Dynamically From ISP (yes)
Use Static IP Address (no)
IP Address 75.185. CROSSED-OUT3
IP Subnet Mask 255.255.248.0
Gateway IP Address 75.185.CROSSED-OUT4
Domain Name Server (DNS) Address
Get Automatically From ISP (yes)
Use These DNS Servers (blank)
Primary DNS ... (blank)
Secondary DNS ... (blank)
Netgear Router Status Page:
Account Name WGT624v3
Hardware Version V3H1
Firmware Version V2.0.16_1.0.1NA
Internet Port
MAC Address 00:40:ca:a8:CROSSED-OUT2
IP Address 75.185.CROSSED-OUT3
DHCP DHCPClient
IP Subnet Mask 255.255.248.0
Domain Name Server 65.24.7.3
65.24.7.6
LAN Port
MAC Address 00:18:4D:85:CROSSED-OUT1
IP Address 192.168.1.1
DHCP ON
IP Subnet Mask 255.255.255.0
Excerpt from doing a prtconf -D command:
pci10de,26f, instance #0 (driver name: pci_pci)
pci1028,8010, instance #0 (driver name: hci1394)
pci1148,5021, instance #0 (driver name: skge)
pci1028,1ed
pci1022,1100
The NIC is a SysKonnect 9821 1GB Ethernet card. The drivers in Solaris 10 were apparently very old and didn't install drivers or configure/plumb when I installed Solaris 10, so I downloaded the
latest drivers (hard to find!), followed the instructions and got the NIC drivers installed and then plumbed.
My router's ip address appears to be 192.168.1.1 and in one of the articles I've read, there is a recommendation to create a file (touch) within /etc named defaultrouter and enter the router's ip address. I did this, and the file now contains:
192.168.1.1
I also read where another file called resolv.conf needed to be pointed to a DNS server, which in this case, according to my Netgear router, and according to ipconfig/all on another WinBox on the same network, also shows the same 192.168.1.1 address for the DNS, so I created that file too (wasn't there) and it contains:
nameserver 192.168.1.1
There is a host name file called hostname.skge0 and it contains one line:
INTHOST
There is a hosts file, and it contains:
127.0.0.1 localhost loghost homex86
192.168.1.3 INTHOST
There is a netmasks file, and other than the commented out lines, it appears to contain one relevant line:
192.168.1.0 255.255.255.0
There is a nsswitch.conf file and other than the commented out lines, it contains:
passwd: files
group: files
hosts: files
ipnodes: files
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
netgroup: files
automount: files
aliases: files
services: files
printers: user files
auth_attr: files
prof_attr: files
project: files
tnrhtp: files
tnrhdb: files
There is an nsswitch.dns file:
passwd: files
group: files
ipnodes: files dns
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
netgroup: files
automount: files
aliases: files
services: files
printers: user files
auth_attr: files
prof_attr: files
project: files
tnrhtp: files
tnrhdb: files
Finally, I've also seen some advice using the folling command (and I tried it):
"route add default 192.168.1.1" as an alternative method of setting up route table
The only other command I've tried is:
"ifconfig skge0 192.168.1.1 netmask 255.255.255.0 up" but I suspect that was redundant as the plumb command I used to get the NIC functioning earlier probably already provided what was needed.
Finally, on this small network, I ran an ipconfig/all on a Windows based PC, to see what network settings were reported through the wireless connection, and this is an excerpt of that information:
C:\Documents and Settings\mark_burke>ipconfig/all
Windows IP Configuration
Ethernet adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Broadcom NetXtreme 57xx Gigabit Controller
Physical Address. . . . . . . . . : (withheld)
Ethernet adapter {xxxxxxxx}:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Nortel IPSECSHM Adapter - Packet Scheduler Min
iport
Physical Address. . . . . . . . . : (withheld)
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 0.0.0.0
Subnet Mask . . . . . . . . . . . : 0.0.0.0
Default Gateway . . . . . . . . . :
Ethernet adapter Wireless Network Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Dell Wireless 1370 WLAN Mini-PCI Card
Physical Address. . . . . . . . . : (withheld)
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.1.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 192.168.1.1I�ve recently installed Solaris v10 X86 and have two
questions. The system is a Dell E521 with 4GB RAM
and 1GB SysKonnect NIC, and internet is provided via
a cable modem, that�s plugged into a Netgear router,
and the Solaris 10 box is plugged into the Netgear
router via a CAT5 ethernet cable.
1. I can connect to my router login page using the
following URL:
http://192.168.1.1/start.htm and I can also connect
to various web pages such as yahoo, if I first "ping
yahoo.com" (on another machine that�s internet
enabled) and then plug the web site�s ip address into
the Solaris/Mozilla browser. So it appears that I
haven�t been successful at pointing the Solaris x86
at a DNS server to resolve the DNS name.You can either copy nsswitch.dns to nsswitch.conf, or you can modify nsswitch.conf so that 'dns' is used for hostname lookups.
2. I've purchased a commercially available software
package and it requires a static ip address for this
Solaris x86 server. If the ip address changes, it�ll
stop working by design and require that I reacquire
the license file. When connecting through this
Netgear router, how do I lock this Solaris v10 x86
server into a specific ip address? (the ip address
floats presently when cycling my PC�s on/off)
presently, and assume the Solaris box will too,
usually through an ip range of 192.168.1.<1 through
5>One method is setting the router so that the server's MAC address is tied to a specific IP.
Otherwise you can edit /etc/hostname.<interface> and place a static address there, forgoing DHCP services from the router. You may want the address to appear outside the router's DHCP range.
Darren -
Dynamic PAT and Static NAT issue ASA 5515
Hi All,
Recently we migrated our network to ASA 5515, since we had configured nat pool overload on our existing router the users are able to translated their ip's outside. Right now my issue was when I use the existing NAT configured to our router into firewall, it seems that the translation was not successful actually I used Dynamic NAT. When I use the Dynamic PAT(Hide) all users are able to translated to the said public IP's. I know that PAT is Port address translation but when I use static nat for specific server. The Static NAT was not able to translated. Can anyone explain if there's any conflict whit PAT to Static NAT? I appriciate their response. Thanks!
- BhalHi,
I would have to guess that you Dynamic PAT was perhaps configured as a Section 1 rule and Static NAT configured as Section 2 rule which would mean that the Dynamic PAT rule would always override the Static NAT for the said host.
The very basic configured for Static NAT and Default PAT I would do in the following way
object network STATIC
host
nat (inside,outside) static dns
object-group network DEFAULT-PAT-SOURCE
network-object
nat (inside,outside) after-auto source dynamic DEFAULT-PAT-SOURCE interface
The Static NAT would be configured as Network Object NAT (Section 2) and the Default PAT would be configured with Twice NAT / Manual NAT (after-auto specifies it as Section 3 rule)
This might sound confusing. Though it would be easier to say what the problem is if we saw the actual NAT configuration. Though I gave the reason that I think is probably one of the most likely reasons if there is some conflict with the 2 NAT rules
You can also check out a NAT document I made regarding the new NAT configuration format and its operation.
https://supportforums.cisco.com/docs/DOC-31116
Hope this helps
- Jouni -
Hi, I'm trying to execute a .NET assembly's method from SQL Server 2012 Express, but I'm stuck with this error calling the sp:
Microsoft.Practices.ServiceLocation.ActivationException: Activation error occured while trying to get instance of type ISymmetricCryptoProvider, key "TripleDESCryptoServiceProvider" ---> Microsoft.Practices.Unity.ResolutionFailedException:
Resolution of the dependency failed, type = "Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ISymmetricCryptoProvider", name = "TripleDESCryptoServiceProvider".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ISymmetricCryptoProvider, is an interface and cannot be constructed. Are you missing a type mapping?
At the time of the exception, the container was:
Resolving Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ISymmetricCryptoProvider,TripleDESCryptoServiceProvider
---> System.InvalidOperationException: The current type, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.ISymmetricCryptoProvider, is an interface and cannot be constructed. Are you missing a type mapping?
System.InvalidOperationException:
en Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForAttemptingToConstructInterface(IBuilderContext context)
en BuildUp_Microsoft.Practices.EnterpriseLibrary.Security
Microsoft.Practices.ServiceLocation.ActivationException:
en Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
en Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService](String key)
en Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.GetSymmetricCryptoProvider(String symmetricInstance)
en Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.DecryptSymmetric(String symmetricInstance, String ciphertextBase64)
en ...
Is there any limitation by design for Interface instantiation from CLR database?
Any help I will appreciate, thanks a million!!Bob, thanks for your response.. Yes, the code works fine outside of SQLCLR. This is the class I'm trying to instantiate, I'm using it to envolve Cryptographer, an Enterprise Library 5.0 class actually, so I have no control to test it without referring the
interface.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Security.Cryptography;
using System.Security.Cryptography;
using Microsoft.SqlServer.Server;
using System.Data.SqlTypes;
namespace Cars.UtileriasGlobales.Helpers
/// <summary>
/// Clase que permite encriptar y desencriptar cadenas de textos utilizando
/// TripleDESCryptoServiceProvider de Enterprise Library 5.0
/// </summary>
public static class Cryptography
#region Metodos
[SqlProcedure]
public static void DesencriptarSQLServer(SqlString cadena, out SqlString cadenaDesencriptada)
cadenaDesencriptada = !String.IsNullOrEmpty(cadena.ToString()) ? Cryptographer.DecryptSymmetric("TripleDESCryptoServiceProvider", cadena.ToString().Replace(" ", "+"))
: String.Empty;
#endregion
I have collected all the dependent assemblies in one directory 'C:\migrate', so the create assembly finish ok. This is the script to create the assembly I'm using:
sp_configure 'clr enable', 1
GO
RECONFIGURE
GO
ALTER DATABASE cars SET TRUSTWORTHY ON
GO
CREATE ASSEMBLY CryptographyEntLib5
AUTHORIZATION dbo
FROM 'C:\migrate\Cars.UtileriasGlobales.dll'
WITH PERMISSION_SET = UNSAFE
GO
CREATE PROCEDURE usp_Desencriptar
@cadena nvarchar(200),
@cadenaDesencriptada nvarchar(MAX) OUTPUT
AS EXTERNAL NAME CryptographyEntLib5.[Cars.UtileriasGlobales.Helpers.Cryptography].DesencriptarSQLServer
GO
DECLARE @msg nvarchar(MAX)
EXEC usp_Desencriptar 'Kittu And Tannu',@msg output
PRINT @msg -
Unusual use of interface defining static factory class with getInstance
This question is prompted by a recent New to Java forum question ask about the differences between Interfaces and Abstract classes. Of course one of the standard things mentioned is that interfaces cannot actually implement a method.
One of my past clients, one of the 500 group, uses interfaces as class factories. The interface defines a pubic static class with a public static method, getInstance, that is called to generate instances of a class that implements the interface.
This architecture was very object-oriented, made good use of polymorphism and worked very well. But I haven't seen this architecture used anywhere else and it seemed a little convoluted.
Here is a 'pseudo' version of the basic interface template and use
-- interface that defines public static factory class and getInstance method
public interface abc {
public static class FactoryClass
public static abc getInstance ()
return (abc) FactoryGenerator(new abcImpl(), abc.class);
-- call of interface factory to create an instance
abc myABC = abc.Factory.getInstance();1. Each main functional area ('abc' in the above) has its own interface factory
2. Each main functional area has its own implementation class for that interface
3. There is one generator (FactoryGenerator) that uses the interface class ('abc.class') to determine which implementation class to instantiate and return. The generator class can be configured at startup to control the actual class to return for any given interface.
I should mention that the people that designed this entire architecture were not novices. They wrote some very sophisticated multi-threaded code that rarely had problems, was high performance and was easy to extend to add new functionality (interfaces and implementing classes) - pretty much plug-n-play with few, if any, side-effects that affected existing modules.
Is this a best-practices method of designing factory classes and methods? Please provide any comments about the use of an architecture like this.Thanks for the feedback.
>
I don't see how 'the generator class can be configured at startup to control the actual class to return for any given interface' can possibly be true given this pseudo-code.
>
I can see why that isn't clear just from what is posted.
The way it was explained to me at the time is that the interface uses standard naming conventions and acts like a template to make it easy to clone for new modules: just change 'abc' to 'def' in three places and write a new 'defImpl' class that extends the interface and the new interface and class can just 'plug in' to the framework.
The new 'defImpl' class established the baseline functionality that must be supported. This line
return (abc) FactoryGenerator(new abcImpl(), abc.class);uses the initial version of the new class that was defined, 'abcImpl()', when calling the FactoryGenerator and it acted as a 'minimum version supported'. The generator class could use configuration information, if provided, to provide a newer class version that would extend this default class. Their reasoning was that this allowed the framework to use multiple versions of the class as needed when bugs got fixed or new functionality was introduced.
So the initial objects would be an interface 'abc' and a class 'abcImpl'. Then the next version (bug fixes or enhancements) would be introduced by creating a new class, perhaps 'abcImpl_version2'. A configuration parameter could be passed giving 'abcImpl' as the base class to expect in the FactoryGenerator call and the generator would actually create an instance of 'abcImpl_version2' or any other class that extended 'abcImpl'.
It certainly go the job done. You could use multiple versions of the class for different environments as you worked new functionality from DEV, TEST, QA and PRODUCTION environments without changing the basic framework.
I've never seen any Java 'pattern' that looks like that or any pattern where an interface contained a class. It seemed really convoluted to me and seems like the 'versioning' aspect of it could have been accomplished in a more straightforward manner.
Thanks for the feedback. If you wouldn't mind expanding a bit on one comment you made then I will mark this ANSWERED and put it to rest.
>
I don't mind interfaces containing classes per se when necessary
>
I have never seen this except at this one site. Would you relate any info about where you have seen or used this or when it might be necessary? -
AP Manager interface and Virtual Interface
What do each of these interfaces do on the 526 WMAC? I am not sure I understand the functionality and did not find the answer to this in the documentation.
ThanksWell from a WLC, the management is used to access and manage the wlc. It is also used for communication with the mobility group. AP-Manager is the interface the wlc and the ap's use and the virtual interface is used by internal dhcp, mobility group, webauth, etc. The virtual interface is not routable in your network, it is mainly used by the wlc's for various features.
Here is from a Cisco Doc:
The management interface is the default interface for in-band management of the controller and connectivity to enterprise services such as AAA server. If the service port is in use, the management interface must be on a different subnet than the service port.
The AP-Manager interface is used as the source IP address for all Layer 3 communications between the controller and the lightweight access points. The AP-Manager must have a unique IP address and should be on the same subnet as the management interface.
The virtual gateway interface is used to support mobility management, DHCP relay, and embedded Layer 3 security, like guest web authentication and VPN termination. The virtual interface must be configured with an unassigned and unused gateway IP address. If multiple controllers are configured in a mobility group, the virtual interface must be the same on all controllers for seamless roaming.
The service-port interface is mapped only to the physical service port. The service port interface must have an IP address on a different subnet from the management and AP-Manager interfaces. A default-gateway cannot be assigned to the service-port interface, but static routes can be defined through the controller command-line interface for remote network access to the service port. -
Implementing interface with static method?
Hi,
I need to implement an interface with a static method. I tried to do it both with the interface method static and non-static, but it don't seam to work! Does it work?
How can I make a work around?
Thanks!Interfaces are designed to provide a contract that a particular object instance guarantees for it's Clients.
Since a static method does not relate to any particular object instance there is no contract to define...hence you can't have an interface for static methods...
What you could do however is return an object via a static method that does provide the implementation of the interface...
i.e.public class MyClass
static private String myInterfaceImpl = "<some class>";
static public MyInterface getInterface ()
return (MyInterface) MyClass.class.forName (MyClass.myInterfaceImpl).newInstance ();
}That would return an object that provides the interface. I would presume you need the static method so that you don't have to pass around references to a particular object...this method gets around that...you could also create a single object at start up time and return a reference to that eveytime...
Also, in a way static methods do define an interface... -
I want to implement an interface (to set common methods), but I want a method to be a class method of the concrete subclasses. Is there any way to do this? I cannot declare methods static in an interface. If I declare the method static in the concrete subclass this generates a compiler error.
No I tried that! You cannot declare a class abstract and then declare the method abstract and static!
I can create a method in the abstract class that is static and this can then be overwritten in the subclass, but there is no guarantee that the subclass implementer overwrites this method.
Perhaps a redesign is in order. I don't think what I am trying to do is so obscure an interface means that you can be sure that the method is implemented, but this method is crying out to be a static method! -
Hello-
We currently have NW6 running BM3.7 set up with 1 public interface and 1
private interface. Our private interface is 10.1.1.1 and we are NATing
that to our public interface. We are using HTTP proxy services for all our
internet browsing---proxy being the 10.1.1.1 address. The public interface
is on a state WAN link and we are using it for internet browsing, email,
citrix and other state applications. We want to offload our email,
internet and citrix traffic onto another public intrface--which is
provided by a different ISP. I know what I need to do to change over the
email to the new ipaddress on the new interface. How do I set up BM to
route internet traffic to the new public interface? Also how do I make
sure that my citrix traffic is routed to the new interface as well? Any
help with this would be greatly appreciated.
Thanks all in advance!You cannot arbitrarily send some type of traffic to one NIC, and the
rest to another. The outbound traffic will follow the default route.
You can have some limited control by using static routing to force
traffic to certain addresses out one NIC, but that tends to be useful
mostly with S2S VPN dedicated links.
You can also enable dynamic NAT on the LAN side of one of your internet
routers, and make reply traffic to inbound traffic from that link go
back the way it came in.
Craig Johnson
Novell Support Connection SysOp
*** For a current patch list, tips, handy files and books on
BorderManager, go to http://www.craigjconsulting.com *** -
Interfaces and defining Generics
This could be a sophisticated question. At least it drives me crazy. ;)
We define the following generic class:
public class Generic2 <E extends TestClass & TestInterface> {
public E getTheGenericType() {
return null;
}So it is assured that E is is of type 'TestClass' AND from type 'TestInterface', right?
Now I could use Generic2 like this:
Generic2 myGen = new Generic2<TestDataClass>();
TestClass test = myGen.getTheGenericType();That works fine! Also it should be possible to define:
TestInterface inter = myGen.getTheGenericType();But this line generates the compiler-error:
Type mismatch: cannot convert from TestClass to TestInterface
Can somebody please explain what's going wrong here?The compiler is correct. When you use
Generic2 myGenthe type of the myGen will be raw type Generic2, but not a generic type (JLS 4.8). As declared in JLS
The type of a constructor (�8.8), instance method (�8.8, �9.4), or non-static field (�8.3) M of a raw type C that is not inherited from its superclasses or superinterfaces is the erasure of its type in the generic declaration corresponding to C. The type of a static member of a raw type C is the same as its type in the generic declaration corresponding to C.
And, from JLS 4.6
The erasure of a type variable (�4.4) is the erasure of its leftmost bound.
So, when method getTheGenericType is used in the context of raw type, it have return type "erasure of E", which is "leftmost bound", i.e. TestClass. And TestClass does not implements TestInterface, which leads to type mistmatch.
But when myGen is declared as instance of generic type (like Generic2<TestDataClass> or Generic2<?>), then all compiles fine (because return type of getTheGenericType is E (not TestClass, as was in the case of the row type), and E implements TestInterface, as declared in the E bound).
See the following code:
public class Test {
static interface TestInterface {
static class TestClass {
static class Generic2 <E extends TestClass & TestInterface> {
public E getTheGenericType() {
return null;
class TestDataClass extends TestClass implements TestInterface {
public static void main(String [] args) {
//this declaration lead to compilation error
//Generic2 myGen = new Generic2<TestDataClass>();
//and this declaration does not
//Generic2<TestDataClass> myGen = new Generic2<TestDataClass>();
//and this does not too
Generic2<?> myGen = new Generic2<TestDataClass>();
TestClass test = myGen.getTheGenericType();
TestInterface inter = myGen.getTheGenericType();
}The first declaration (commented) gives type mistmatch, but both other compiles filne.
P.S. JLS is "Java Language Specification, 3rd edition"
Maybe you are looking for
-
Hi Guys, I would like to upload vendor invoices by using LSMW tool. The imported method type is Batch input recording (Tcode FB60). The problem is: I have text file as with the following format, Vendor Inv.Date Reference Desc Amount GLcode WBS eleme
-
Best way to move 2 iMovie projects to 1 iDVD project?
I am in a last minute bind and I was hoping I could get some help! I am making a DVD for my wedding reception that is NEXT weekend. ah! Anyway...here is what I have done: 1. Created three slideshows w/ KB effects in iPhoto and exported them to quickt
-
I want to disable right-clikc menu for examle (closerow) How can I make it?
Hi,Exports, Could you tell me as to how to resolve it in steps? Thank you in advance.
-
Is getting an iMac AND Macbook Air reasonable?
Hello I've been a computery guy for some time. I am going from being a serious gamer that built a custom gaming PC that cost $3,500+ to selling said gaming PC and having no computer at all. I am giving up gaming to return to school and would like t
-
Shutdown immediate hangs ORA-12012, ORA-12008, ORA-06512
We have a problem while immediate shutting down the database: alert.log: Errors in file /data_archiv/oracle/admin/EGB/bdump/egb_j001_7708.trc: ORA-12012: error on auto execute of job 3 ORA-12008: error in materialized view refresh path ORA-01089: imm